public class ServerProxyBroker extends AbstractBroker
| Constructor and Description |
|---|
ServerProxyBroker(Broker broker,
ClientStubManager clientManager,
MessageStream linkActor) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the Broker
|
java.lang.String |
getAddress()
Returns the broker's address, i.e.
|
java.lang.String |
getClientAddress() |
Mailbox |
getMailbox(java.lang.String address)
Returns the actor stream for the given address.
|
protected MessageStream |
getQueryErrorStream(java.lang.String from) |
boolean |
isClosed()
Returns true if the broker has been closed
|
void |
message(java.lang.String to,
java.lang.String from,
java.io.Serializable payload)
Sends a message to the link service if 'to' is null, else send it to the broker.
|
void |
messageError(java.lang.String to,
java.lang.String from,
java.io.Serializable payload,
BamError error)
Handles a message
|
void |
query(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable payload)
Handles a query.
|
void |
queryError(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable payload,
BamError error)
Handles a query error.
|
void |
queryResult(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable payload)
Handles a query result.
|
java.lang.String |
toString() |
addMailbox, getBroker, getBrokerMailbox, getQueueFullHandler, removeMailbox, setQueueFullHandlerpublic ServerProxyBroker(Broker broker, ClientStubManager clientManager, MessageStream linkActor)
public java.lang.String getAddress()
AbstractBrokergetAddress in interface MessageStreamgetAddress in class AbstractBrokerpublic java.lang.String getClientAddress()
public Mailbox getMailbox(java.lang.String address)
AbstractBrokerStreamgetMailbox in interface BrokergetMailbox in class AbstractBrokeraddress - the address of the mailboxpublic void message(java.lang.String to,
java.lang.String from,
java.io.Serializable payload)
message in interface MessageStreammessage in class AbstractBrokerStreamto - the target actor's addressfrom - the source actor's addresspayload - the message payloadpublic void messageError(java.lang.String to,
java.lang.String from,
java.io.Serializable payload,
BamError error)
messageError in interface MessageStreammessageError in class AbstractBrokerStreamto - the target actor's addressfrom - the source actor's addresspayload - the original message payloaderror - the message errorpublic void query(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable payload)
query in interface MessageStreamquery in class AbstractBrokerStreamid - the query identifier used to match requests with responsesto - the service actor's addressfrom - the client actor's addresspayload - the query payloadprotected MessageStream getQueryErrorStream(java.lang.String from)
getQueryErrorStream in class AbstractBrokerStreampublic void queryResult(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable payload)
queryResult in interface MessageStreamqueryResult in class AbstractBrokerStreamid - the query identifier used to match requests with responsesto - the client actor's addressfrom - the service actor's addresspayload - the result payloadpublic void queryError(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable payload,
BamError error)
queryError in interface MessageStreamqueryError in class AbstractBrokerStreamid - the query identifier used to match requests with responsesto - the client actor's addressfrom - the service actor's addresspayload - the result payloaderror - additional error informationpublic boolean isClosed()
AbstractBrokerisClosed in interface MessageStreamisClosed in class AbstractBrokerpublic void close()
Brokerclose in interface Brokerclose in class AbstractBrokerpublic java.lang.String toString()
toString in class AbstractBrokerStream