|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.bam.client.OutboundMessageStream
public class OutboundMessageStream
HMTP client protocol
| Constructor Summary | |
|---|---|
OutboundMessageStream(LinkConnectionFactory linkFactory,
Broker inboundBroker)
|
|
| Method Summary | |
|---|---|
java.lang.String |
getAddress()
Returns the address of the ActorHolder at the end
of the stream. |
Broker |
getBroker()
Returns the owning broker |
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 to an ActorHolder,
addressed by the Actor's address. |
void |
messageError(java.lang.String to,
java.lang.String from,
java.io.Serializable payload,
BamError error)
Sends a message error to an ActorHolder,
addressed by the Actor's address. |
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public OutboundMessageStream(LinkConnectionFactory linkFactory,
Broker inboundBroker)
| Method Detail |
|---|
public java.lang.String getAddress()
MessageStreamActorHolder at the end
of the stream.
getAddress in interface MessageStreampublic Broker getBroker()
MessageStream
getBroker in interface MessageStreampublic boolean isClosed()
MessageStream
isClosed in interface MessageStream
public void message(java.lang.String to,
java.lang.String from,
java.io.Serializable payload)
MessageStreamActorHolder,
addressed by the Actor's address.
message in interface MessageStreamto - the target actor's addressfrom - the source actor's addresspayload - the message payload
public void messageError(java.lang.String to,
java.lang.String from,
java.io.Serializable payload,
BamError error)
MessageStreamActorHolder,
addressed by the Actor's address. Actor protocols may choose to send
error messages if a message fails for some reason.
In general, Actors should not rely on the delivery of error messages.
If an error return is required, use an RPC query instead.
messageError in interface MessageStreamto - the target actor's addressfrom - the source actor's addresspayload - the message payloaderror - the message error
public 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 payload
public void queryResult(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable payload)
MessageStream
queryResult in interface MessageStreamid - the query identifier used to match requests with responsesto - the client actor's addressfrom - the service actor's addresspayload - the result payload
public void queryError(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable payload,
BamError error)
MessageStream
queryError 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 java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||