public interface Messenger
| Modifier and Type | Field and Description |
|---|---|
static int |
CUMULATIVE
Flag for use with reject(), accept() and settle() methods.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(Tracker tracker,
int flags)
Accepts messages retrieved from the incoming message queue.
|
Message |
get()
Returns the message from the head of the incoming message
queue.
|
int |
getIncomingWindow() |
int |
getOutgoingWindow() |
Status |
getStatus(Tracker tracker)
Gets the last known remote state of the delivery associated
with the given tracker.
|
long |
getTimeout() |
int |
incoming()
Returns a count of the messages available on the incoming
queue.
|
Tracker |
incomingTracker()
Returns a token which can be used to accept or reject the
message returned in the previous get() call.
|
int |
outgoing()
Returns a count of the messages currently on the outgoing queue
(i.e.
|
Tracker |
outgoingTracker()
Returns a token which can be used to track the status of the
message of the previous put() call.
|
void |
put(Message message)
Places the content contained in the message onto the outgoing
queue of the Messenger.
|
void |
recv(int count)
Receives up to the specified number of messages into the
incoming queue of the Messenger.
|
void |
reject(Tracker tracker,
int flags)
Rejects messages retrieved from the incoming message queue.
|
void |
send()
Blocks until the outgoing queue is empty and, in the event that
an outgoing window has been set, until the messages in that
window have been received by the target to which they were
sent, or the operation times out.
|
void |
setIncomingWindow(int window) |
void |
setOutgoingWindow(int window) |
void |
setTimeout(long timeInMillis) |
void |
settle(Tracker tracker,
int flags) |
void |
start()
Transitions the Messenger to an active state.
|
void |
stop()
Transitions the Messenger to an inactive state.
|
void |
subscribe(java.lang.String source)
Subscribes the Messenger to messages originating from the
specified source.
|
static final int CUMULATIVE
void put(Message message) throws MessengerException
MessengerExceptionvoid send()
throws java.util.concurrent.TimeoutException
java.util.concurrent.TimeoutExceptionvoid subscribe(java.lang.String source)
throws MessengerException
MessengerExceptionvoid recv(int count)
throws java.util.concurrent.TimeoutException
java.util.concurrent.TimeoutExceptionMessage get()
void start()
throws java.io.IOException
java.io.IOExceptionvoid stop()
void setTimeout(long timeInMillis)
long getTimeout()
int outgoing()
int incoming()
int getIncomingWindow()
void setIncomingWindow(int window)
int getOutgoingWindow()
void setOutgoingWindow(int window)
Tracker incomingTracker()
Tracker outgoingTracker()
void reject(Tracker tracker, int flags)
void accept(Tracker tracker, int flags)
void settle(Tracker tracker, int flags)
Copyright © 2013 FuseSource, Corp.. All Rights Reserved.