Interface aglet.MessageManager
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface aglet.MessageManager

public interface MessageManager
extends Object
MessageManager はメッセージの並行実行を制御します。 どのメッセージもプライオリティを持ち, そのプライオリティに 応じてメッセージキューに詰まれる.
See Also:
FutureReply, ReplySet

Variable Index

 o ACTIVATE_AGLET
プライオリティの値で, 論理和のとして用いられる.
 o MAX_PRIORITY
メッセージが持つことのできる最大のプライオリティ.
 o MIN_PRIORITY
メッセージが持つことのできる最小のプライオリティ.
 o NORM_PRIORITY
メッセージのデフォルトのプライオリティ.
 o NOT_QUEUED
setPriorityの引数として使われる.

Method Index

 o destroy()
メッセージマネージャを破壊する.
 o exitMonitor()
現在のmonitorを出る.
 o notifyAllMessages()
waitしているすべてのスレッドにnotifyする.
 o notifyMessage()
waitしているどれか一つのスレッドにnotifyする.
 o setPriority(String, int)
メッセージのプライオリティを設定する.
 o waitMessage()
notifyされるまでwaitする.
 o waitMessage(long)
notifyされるか, タイムアウトするまでwaitする.

Variables

 o NOT_QUEUED
  public final static int NOT_QUEUED
setPriorityの引数として使われる. この値は同じ種別のメッセージはキューに詰まれずに その場で処理されることを意味する.
See Also:
setPriority
 o ACTIVATE_AGLET
  public final static int ACTIVATE_AGLET
プライオリティの値で, 論理和のとして用いられる. この種のメッセージを受け取ると, agletは非活性化状態 にあっても自動的に活性化(activate)されることになる.
   getMessageManager().setPriority("wakeMeUp",
                                   NORM_PRIORITY | ACTIVATE_AGLET);
  
See Also:
setPriority
 o MIN_PRIORITY
  public final static int MIN_PRIORITY
メッセージが持つことのできる最小のプライオリティ.
See Also:
setPriority
 o NORM_PRIORITY
  public final static int NORM_PRIORITY
メッセージのデフォルトのプライオリティ.
See Also:
setPriority
 o MAX_PRIORITY
  public final static int MAX_PRIORITY
メッセージが持つことのできる最大のプライオリティ.
See Also:
setPriority

Methods

 o waitMessage
  public abstract void waitMessage()
notifyされるまでwaitする.
Throws: IllegalMonitorStateException
カレントスレッドがmonitorの所有者ではない.
See Also:
notifyMessage, notifyAllMessage
 o waitMessage
  public abstract void waitMessage(long timeout)
notifyされるか, タイムアウトするまでwaitする.
Throws: IllegalMonitorStateException
カレントスレッドがmonitorの所有者ではない.
See Also:
waitMessage, notifyMessage, notifyAllMessage
 o notifyMessage
  public abstract void notifyMessage()
waitしているどれか一つのスレッドにnotifyする.
Throws: IllegalMonitorStateException
カレントスレッドがmonitorの所有者ではない.
See Also:
notifyMessage, waitMessage, notifyAllMessage
 o notifyAllMessages
  public abstract void notifyAllMessages()
waitしているすべてのスレッドにnotifyする.
Throws: IllegalMonitorStateException
カレントスレッドがmonitorの所有者ではない.
See Also:
notifyAllMessage, waitMessage, notifyMessage
 o exitMonitor
  public abstract void exitMonitor()
現在のmonitorを出る.
See Also:
exitMonitor, waitMessage, notifyMessage, notifyAllMessages
 o setPriority
  public abstract void setPriority(String kind,
                                   int priority)
メッセージのプライオリティを設定する.
Parameters:
kind - プライオリティを設定する種別
priority - プライオリティ
 o destroy
  public abstract void destroy()
メッセージマネージャを破壊する. このメソッドの呼び出しの後には, メッセージマネージャは 有効(valid)でなくなり, キューに詰まれているメッセージや, 以後到着するすべてのメッセージは拒否される.

All Packages  Class Hierarchy  This Package  Previous  Next  Index