|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ActorProxy
ActorProxy is a convenience API for sending messages to a specific Actors, which always using the actor's address as the "from" parameter.
| Method Summary | |
|---|---|
void |
close()
Closes the proxy |
MessageStream |
getActorStream()
Returns the stream to this client. |
java.lang.String |
getAddress()
Returns the proxy's address used for all "from" parameters. |
MessageStream |
getClientStream()
Returns the registered callback MessageStream. |
MessageStream |
getLinkStream()
The ActorStream to the link. |
java.lang.String |
getTo()
Returns the target actor's address used for all "to" parameters. |
boolean |
isClosed()
Returns true if the proxy is closed |
void |
message(java.io.Serializable payload)
Sends a unidirectional message to the target ActorHolder, |
java.io.Serializable |
query(java.io.Serializable payload)
Sends a query information call (get) to an actor, blocking until the actor responds with a result or an error. |
java.io.Serializable |
query(java.io.Serializable payload,
long timeout)
Sends a query information call (get) to an actor, blocking until the actor responds with a result or an error. |
void |
query(java.io.Serializable payload,
QueryCallback callback)
Sends a query information call (get) to an actor, providing a callback to receive the result or error. |
void |
setClientStream(MessageStream clientStream)
Registers a callback MessageStream with the client |
void |
setLinkStream(MessageStream linkStream)
Sets the ActorStream to the link. |
| Method Detail |
|---|
java.lang.String getAddress()
java.lang.String getTo()
void message(java.io.Serializable payload)
ActorHolder,
payload - the message payloadjava.io.Serializable query(java.io.Serializable payload)
queryGet 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 target actor MUST send a queryResult or
queryError to the client using the same id,
because RPC clients rely on a response.
payload - the query payload
java.io.Serializable query(java.io.Serializable payload,
long timeout)
queryGet 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 target actor MUST send a queryResult or
queryError to the client using the same id,
because RPC clients rely on a response.
payload - the query payloadtimeout - time spent waiting for the query to return
void query(java.io.Serializable payload,
QueryCallback callback)
queryGet 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 target actor MUST send a queryResult or
queryError to the client using the same id,
because RPC clients rely on a response.
to - the target actor's addresspayload - the query payloadcallback - the application's callback for the resultvoid setClientStream(MessageStream clientStream)
MessageStream with the client
MessageStream getClientStream()
MessageStream.
MessageStream getActorStream()
MessageStream getLinkStream()
void setLinkStream(MessageStream linkStream)
boolean isClosed()
void close()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||