|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectkaos.core.service.transport.cougaar.CougaarMessageReceiver
public class CougaarMessageReceiver
| Field Summary | |
|---|---|
static java.lang.String |
RESPONSE
|
| Constructor Summary | |
|---|---|
CougaarMessageReceiver(CougaarServiceRoot sr)
Constructor |
|
CougaarMessageReceiver(CougaarServiceRoot sr,
JasBean env)
|
|
| Method Summary | |
|---|---|
void |
addMessageListener(MessageListener ml)
Adds a MessageListener to the MessageReceiver for asynchronous message delivery. |
static void |
addMessageReceivedRunnable(java.lang.Runnable runnable)
Add a runnable to be executed inside the transaction that the message is marked as received. |
void |
bindToLocalLocator(Locator l)
The method which binds the MessageReceiver to a local locator. |
long |
currentTimeMillis()
|
void |
execute()
|
java.lang.String |
getBlackboardClientName()
Cougaar BlackboardClient implementation |
Locator |
getLocalLocator()
Returns a local locator depending upon binding status. |
TransportMessage |
getMessage()
A blocking read operation. |
TransportMessage |
getMessage(long wait_millis)
A timed blocking read operation. |
MessageTransportService |
getMessageTransportService()
|
int |
getNumberOfMessages()
The the number returned does not guarantee the actual number of messages available instantaneously. |
static boolean |
isReceiveThread(java.lang.Thread t)
|
void |
removeMessageListener(MessageListener ml)
Removes a MessageListener from the MessageReceiver. |
boolean |
triggerEvent(java.lang.Object event)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String RESPONSE
| Constructor Detail |
|---|
public CougaarMessageReceiver(CougaarServiceRoot sr)
public CougaarMessageReceiver(CougaarServiceRoot sr,
JasBean env)
| Method Detail |
|---|
public void bindToLocalLocator(Locator l)
throws NotLocatableException,
TransportFailure
l - the local Locator.
NotLocatableException - if l is not a local locator.
TransportFailure - if the binding process fails.
public Locator getLocalLocator()
throws TransportFailure
TransportFailure - if any transport related failure occurs.
public void addMessageListener(MessageListener ml)
throws TransportFailure
ml - the MessageListener to callback with the incoming message.
TransportFailure - if any transport related failure occurs.
public void removeMessageListener(MessageListener ml)
throws TransportFailure
ml - the MessageListener to remove from the MessageReceiver.
TransportFailure - if any transport related failure occurs.
public int getNumberOfMessages()
throws TransportFailure
TransportFailure - if any transport related failure occurs.
public TransportMessage getMessage()
throws java.lang.InterruptedException,
TransportFailure
java.lang.InterruptedException - if the waiting thread is interrupted.
TransportFailure - if any transport related failure occurs.
public TransportMessage getMessage(long wait_millis)
throws java.lang.InterruptedException,
TransportFailure
wait_millis - the most the current thread should block for a message.
java.lang.InterruptedException - if the waiting thread is interrupted.
TransportFailure - if any transport related failure occurs.public MessageTransportService getMessageTransportService()
public java.lang.String getBlackboardClientName()
public long currentTimeMillis()
public boolean triggerEvent(java.lang.Object event)
public void execute()
public static boolean isReceiveThread(java.lang.Thread t)
public static void addMessageReceivedRunnable(java.lang.Runnable runnable)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||