public class DualSizeMailbox extends java.lang.Object implements Mailbox
| Constructor and Description |
|---|
DualSizeMailbox(java.lang.String address,
Broker broker,
Mailbox smallMailbox,
Mailbox largeMailbox) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the mailbox
|
MessageStream |
getActorStream()
Returns the actor stream for the actor itself.
|
java.lang.String |
getAddress()
Returns the actor's address
|
Broker |
getBroker()
Returns the owning broker
|
int |
getLargeQueueSize() |
int |
getSize()
Returns the queue size
|
int |
getSmallQueueSize() |
boolean |
isClosed()
Tests if the stream is closed.
|
void |
message(java.lang.String to,
java.lang.String from,
java.io.Serializable payload)
Sends a message
|
void |
messageError(java.lang.String to,
java.lang.String from,
java.io.Serializable payload,
BamError error)
Sends a message
|
void |
query(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable payload)
Query an entity
|
void |
queryError(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable payload,
BamError error)
Query an entity
|
void |
queryResult(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable payload)
Query an entity
|
java.lang.String |
toString() |
public int getSize()
Mailboxpublic int getSmallQueueSize()
public int getLargeQueueSize()
public java.lang.String getAddress()
getAddress in interface MessageStreampublic Broker getBroker()
MessageStreamgetBroker in interface MessageStreampublic boolean isClosed()
MessageStreamisClosed in interface MessageStreampublic MessageStream getActorStream()
MailboxgetActorStream in interface Mailboxpublic void message(java.lang.String to,
java.lang.String from,
java.io.Serializable payload)
message in interface MessageStreamto - 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 MessageStreamto - the target actor's addressfrom - the source actor's addresspayload - the message payloaderror - the message errorpublic void query(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable payload)
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)
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 payloadpublic void queryError(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable payload,
BamError error)
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 void close()
Mailboxpublic java.lang.String toString()
toString in class java.lang.Object