|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface MessageChannel
Base channel interface defining common behavior for message sending and receiving.
| Method Summary | |
|---|---|
DispatcherPolicy |
getDispatcherPolicy()
Return this channel's dispatcher policy |
java.lang.String |
getName()
Return the name of this channel. |
Message |
receive()
Receive a message, blocking indefinitely if necessary. |
Message |
receive(long timeout)
Receive a message, blocking until either a message is available or the specified timeout period elapses. |
boolean |
send(Message message)
Send a message, blocking indefinitely if necessary. |
boolean |
send(Message message,
long timeout)
Send a message, blocking until either the message is accepted or the specified timeout period elapses. |
void |
setName(java.lang.String name)
Set the name of this channel. |
| Method Detail |
|---|
java.lang.String getName()
void setName(java.lang.String name)
DispatcherPolicy getDispatcherPolicy()
boolean send(Message message)
message - the Message to send
true if the message is sent successfully,
false if interrupted
boolean send(Message message,
long timeout)
message - the Message to sendtimeout - the timeout in milliseconds
true if the message is sent successfully,
false if the specified timeout period elapses or
the send is interruptedMessage receive()
Message or null if
interruptedMessage receive(long timeout)
timeout - the timeout in milliseconds
Message or null if the
specified timeout period elapses or the message reception is interrupted
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||