CUMULATIVE| Constructor and Description |
|---|
MessengerImpl()
Deprecated.
This constructor's visibility will be reduced to the default scope in a future release.
Client code outside this module should use a
MessengerFactory instead |
MessengerImpl(String name)
Deprecated.
This constructor's visibility will be reduced to the default scope in a future release.
Client code outside this module should use a
MessengerFactory instead |
| 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.
|
void |
interrupt() |
boolean |
isBlocking() |
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 m)
Places the content contained in the message onto the outgoing
queue of the Messenger.
|
int |
receiving() |
void |
recv()
Receives an arbitrary number of messages into the
incoming queue of the Messenger.
|
void |
recv(int n)
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 |
send(int n) |
void |
setBlocking(boolean b) |
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.
|
boolean |
stopped() |
void |
subscribe(String source)
Subscribes the Messenger to messages originating from the
specified source.
|
String |
toString() |
boolean |
work(long timeout) |
@Deprecated public MessengerImpl()
MessengerFactory instead@Deprecated public MessengerImpl(String name)
MessengerFactory insteadpublic void setTimeout(long timeInMillis)
setTimeout in interface Messengerpublic long getTimeout()
getTimeout in interface Messengerpublic boolean isBlocking()
isBlocking in interface Messengerpublic void setBlocking(boolean b)
setBlocking in interface Messengerpublic void start()
throws IOException
Messengerstart in interface MessengerIOExceptionpublic void stop()
Messengerpublic void put(Message m) throws MessengerException
Messengerput in interface MessengerMessengerExceptionpublic void send()
throws TimeoutException
Messengersend in interface MessengerTimeoutExceptionpublic void send(int n)
throws TimeoutException
send in interface MessengerTimeoutExceptionpublic void recv(int n)
throws TimeoutException
Messengerrecv in interface MessengerTimeoutExceptionpublic void recv()
throws TimeoutException
Messengerrecv in interface MessengerTimeoutExceptionpublic int receiving()
public Message get()
Messengerpublic void subscribe(String source) throws MessengerException
Messengersubscribe in interface MessengerMessengerExceptionpublic int outgoing()
Messengerpublic int incoming()
Messengerpublic int getIncomingWindow()
getIncomingWindow in interface Messengerpublic void setIncomingWindow(int window)
setIncomingWindow in interface Messengerpublic int getOutgoingWindow()
getOutgoingWindow in interface Messengerpublic void setOutgoingWindow(int window)
setOutgoingWindow in interface Messengerpublic Tracker incomingTracker()
MessengerincomingTracker in interface Messengerpublic Tracker outgoingTracker()
MessengeroutgoingTracker in interface Messengerpublic void reject(Tracker tracker, int flags)
Messengerpublic void accept(Tracker tracker, int flags)
Messengerpublic Status getStatus(Tracker tracker)
MessengerCopyright © 2013 The Apache Software Foundation. All rights reserved.