Messenger.Factory
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
Messenger.Factory#create() 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
Messenger.Factory#create(String) 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.
|
String |
getCertificate()
Get the path to the certificate file.
|
int |
getIncomingWindow() |
int |
getOutgoingWindow() |
String |
getPassword()
Get the password for the priate key file.
|
String |
getPrivateKey()
Get the path to the private key file.
|
Status |
getStatus(Tracker tracker)
Gets the last known remote state of the delivery associated
with the given tracker.
|
long |
getTimeout() |
String |
getTrustedCertificates()
Get the path to the trusted certificate database.
|
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()
Returns the capacity of the incoming message queue of
messenger.
|
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 |
rewrite(String pattern,
String address) |
void |
route(String pattern,
String address) |
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 |
setCertificate(String certificate)
Set the path to the certificate file.
|
void |
setIncomingWindow(int window) |
void |
setOutgoingWindow(int window) |
void |
setPassword(String password)
Set the password for private key file.
|
void |
setPrivateKey(String privateKey)
Set the path to private key file.
|
void |
setTimeout(long timeInMillis) |
void |
settle(Tracker tracker,
int flags) |
void |
setTrustedCertificates(String trusted)
Set the path to the trusted certificate database.
|
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)
Sends or receives any outstanding messages queued for a
messenger.
|
@Deprecated public MessengerImpl()
Messenger.Factory#create()
instead@Deprecated public MessengerImpl(String name)
Messenger.Factory#create(String)
insteadpublic void setTimeout(long timeInMillis)
setTimeout
in interface Messenger
public long getTimeout()
getTimeout
in interface Messenger
public boolean isBlocking()
isBlocking
in interface Messenger
public void setBlocking(boolean b)
setBlocking
in interface Messenger
public void setCertificate(String certificate)
Messenger
setCertificate
in interface Messenger
public String getCertificate()
Messenger
getCertificate
in interface Messenger
public void setPrivateKey(String privateKey)
Messenger
setPrivateKey
in interface Messenger
public String getPrivateKey()
Messenger
getPrivateKey
in interface Messenger
public void setPassword(String password)
Messenger
setPassword
in interface Messenger
public String getPassword()
Messenger
getPassword
in interface Messenger
public void setTrustedCertificates(String trusted)
Messenger
setTrustedCertificates
in interface Messenger
public String getTrustedCertificates()
Messenger
getTrustedCertificates
in interface Messenger
public void start() throws IOException
Messenger
start
in interface Messenger
IOException
public void stop()
Messenger
public boolean work(long timeout) throws TimeoutException
Messenger
work
in interface Messenger
TimeoutException
public void put(Message m) throws MessengerException
Messenger
put
in interface Messenger
MessengerException
public void send() throws TimeoutException
Messenger
send
in interface Messenger
TimeoutException
public void send(int n) throws TimeoutException
send
in interface Messenger
TimeoutException
public void recv(int n) throws TimeoutException
Messenger
recv
in interface Messenger
TimeoutException
public void recv() throws TimeoutException
Messenger
recv
in interface Messenger
TimeoutException
public int receiving()
Messenger
public Message get()
Messenger
public void subscribe(String source) throws MessengerException
Messenger
subscribe
in interface Messenger
MessengerException
public int outgoing()
Messenger
public int incoming()
Messenger
public int getIncomingWindow()
getIncomingWindow
in interface Messenger
public void setIncomingWindow(int window)
setIncomingWindow
in interface Messenger
public int getOutgoingWindow()
getOutgoingWindow
in interface Messenger
public void setOutgoingWindow(int window)
setOutgoingWindow
in interface Messenger
public Tracker incomingTracker()
Messenger
incomingTracker
in interface Messenger
public Tracker outgoingTracker()
Messenger
outgoingTracker
in interface Messenger
public void reject(Tracker tracker, int flags)
Messenger
public void accept(Tracker tracker, int flags)
Messenger
public Status getStatus(Tracker tracker)
Messenger
Copyright © 2016 The Apache Software Foundation. All rights reserved.