public class MailboxOperations extends Object
| Constructor and Description |
|---|
MailboxOperations() |
| Modifier and Type | Method and Description |
|---|---|
String |
name()
Returns the name of the mailbox.
|
Node |
node()
Returns the Node of the mailbox.
|
io.appulse.encon.terms.type.ErlangPid |
pid()
Returns the PID of the mailbox.
|
io.appulse.encon.terms.ErlangTerm |
receive()
Returns a new mailbox message.
|
<T> T |
receive(Class<T> type)
Returns a new mailbox message.
|
<T> Optional<T> |
receive(Class<T> type,
long timeout,
TimeUnit unit)
Returns a new mailbox message.
|
Optional<io.appulse.encon.terms.ErlangTerm> |
receive(long timeout,
TimeUnit unit)
Returns a new mailbox message.
|
void |
send(io.appulse.encon.terms.type.ErlangPid to,
Object object)
Sends a message.
|
void |
send(io.appulse.encon.common.NodeDescriptor descriptor,
String mailbox,
Object object)
Sends a message.
|
void |
send(io.appulse.encon.common.RemoteNode remote,
String mailbox,
Object object)
Sends a message.
|
void |
send(String mailbox,
Object object)
Sends a message.
|
void |
send(String node,
String mailbox,
Object object)
Sends a message.
|
public String name()
public io.appulse.encon.terms.type.ErlangPid pid()
public Node node()
public void send(@NonNull
io.appulse.encon.terms.type.ErlangPid to,
@NonNull
Object object)
to - destination PIDobject - message payloadpublic void send(@NonNull
String mailbox,
@NonNull
Object object)
mailbox - destination mailbox nameobject - message payloadpublic void send(@NonNull
String node,
@NonNull
String mailbox,
@NonNull
Object object)
node - destination node namemailbox - destination mailbox nameobject - message payloadpublic void send(@NonNull
io.appulse.encon.common.NodeDescriptor descriptor,
@NonNull
String mailbox,
@NonNull
Object object)
descriptor - destination node descriptormailbox - destination mailbox nameobject - message payloadpublic void send(@NonNull
io.appulse.encon.common.RemoteNode remote,
@NonNull
String mailbox,
@NonNull
Object object)
remote - destination node remote descriptormailbox - destination mailbox nameobject - message payloadpublic io.appulse.encon.terms.ErlangTerm receive()
public Optional<io.appulse.encon.terms.ErlangTerm> receive(long timeout, TimeUnit unit)
timeout - how long to wait before giving up, in units of
unitunit - a TimeUnit determining how to interpret the
timeout parameterpublic <T> T receive(Class<T> type)
type - the type of expected messagepublic <T> Optional<T> receive(Class<T> type, long timeout, TimeUnit unit)
type - the type of expected messagetimeout - how long to wait before giving up, in units of
unitunit - a TimeUnit determining how to interpret the
timeout parameterCopyright © 2018 Appulse. All rights reserved.