public abstract class AbstractMessageStreamFilter extends java.lang.Object implements MessageStream
| Constructor and Description |
|---|
AbstractMessageStreamFilter() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the filter, but not the child by default.
|
java.lang.String |
getAddress()
Returns the address of the final actor
|
Broker |
getBroker()
Returns the broker of the final actor.
|
protected abstract MessageStream |
getNext() |
boolean |
isClosed()
Tests if the stream is closed.
|
void |
message(java.lang.String to,
java.lang.String from,
java.io.Serializable payload)
Sends a unidirectional message
|
void |
messageError(java.lang.String to,
java.lang.String from,
java.io.Serializable payload,
BamError error)
Sends a unidirectional message error
|
void |
query(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable payload)
Sends a query/RPCinformation call
The receiver of a
query acts as a service and the
caller acts as a client. |
void |
queryError(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable payload,
BamError error)
Sends a query error from a failed query.
|
void |
queryResult(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable payload)
Sends a query response for a query
|
java.lang.String |
toString() |
protected abstract MessageStream getNext()
public java.lang.String getAddress()
getAddress in interface MessageStreampublic Broker getBroker()
getBroker in interface MessageStreampublic void message(java.lang.String to,
java.lang.String from,
java.io.Serializable payload)
message in interface MessageStreamto - the target addressfrom - the source addresspayload - the message payloadpublic void messageError(java.lang.String to,
java.lang.String from,
java.io.Serializable payload,
BamError error)
messageError in interface MessageStreamto - the target addressfrom - the source addresspayload - the message payloaderror - the message errorpublic void query(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable payload)
MessageStreamquery acts as a service and the
caller acts as a client. Because BAM Actors are symmetrical, all
Actors can act as services and clients for different RPC calls.
The stream MUST send a queryResult or
queryError to the client using the same id,
because RPC clients rely on a response.query in interface MessageStreamid - the query identifier used to match requests with responsesto - the service actor's addressfrom - the client actor's addresspayload - the query payloadpublic void queryResult(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable payload)
MessageStreamqueryResult in interface MessageStreamid - 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)
MessageStreamqueryError in interface MessageStreamid - the query identifier used to match requests with responsesto - the client actor's addressfrom - the service actor's addresspayload - the query payloaderror - additional error informationpublic boolean isClosed()
MessageStreamisClosed in interface MessageStreampublic void close()
public java.lang.String toString()
toString in class java.lang.Object