public class AbstractAmpBroker extends java.lang.Object implements AmpBroker
Constructor and Description |
---|
AbstractAmpBroker() |
Modifier and Type | Method and Description |
---|---|
AmpActorRef |
addMailbox(java.lang.String address,
AmpMailbox mailbox)
Adds a mailbox (optional operation).
|
void |
close()
Close the broker.
|
AmpActorRef |
getActorRef(java.lang.String to)
Returns a mailbox for the given address,
or null if the mailbox does not exist.
|
AmpActorRef |
getBrokerActor()
Returns the mailbox to the router itself.
|
void |
query(long id,
java.lang.String to,
java.lang.String from,
AmpEncoder encoder,
java.lang.String methodName,
java.lang.Object... args) |
void |
removeMailbox(java.lang.String address,
AmpMailbox mailbox)
Removes a mailbox (optional operation).
|
void |
reply(long id,
java.lang.String to,
java.lang.String from,
AmpEncoder encoder,
java.lang.Object result) |
void |
send(java.lang.String to,
java.lang.String from,
AmpEncoder encoder,
java.lang.String methodName,
java.lang.Object... args) |
public AmpActorRef getActorRef(java.lang.String to)
AmpBroker
getActorRef
in interface AmpBroker
to
- the address of the mailboxpublic AmpActorRef addMailbox(java.lang.String address, AmpMailbox mailbox)
AmpBroker
addMailbox
in interface AmpBroker
public void removeMailbox(java.lang.String address, AmpMailbox mailbox)
AmpBroker
removeMailbox
in interface AmpBroker
public void close()
AmpBroker
public AmpActorRef getBrokerActor()
AmpBroker
getBrokerActor
in interface AmpBroker
public void send(java.lang.String to, java.lang.String from, AmpEncoder encoder, java.lang.String methodName, java.lang.Object... args)
public void query(long id, java.lang.String to, java.lang.String from, AmpEncoder encoder, java.lang.String methodName, java.lang.Object... args)
public void reply(long id, java.lang.String to, java.lang.String from, AmpEncoder encoder, java.lang.Object result)