|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.bam.mailbox.MultiworkerMailbox
public class MultiworkerMailbox
mailbox for BAM messages waiting to be sent to the Actor.
| Constructor Summary | |
|---|---|
MultiworkerMailbox(MessageStream actorStream,
Broker broker,
int threadMax)
|
|
MultiworkerMailbox(java.lang.String address,
MessageStream actorStream,
Broker broker,
int threadMax)
|
|
| Method Summary | |
|---|---|
void |
close()
Closes the mailbox |
protected MailboxWorker |
createWorker()
|
protected Packet |
dequeue()
|
protected void |
dispatch(Packet packet)
Dispatches the packet to the stream |
protected void |
enqueue(Packet packet)
|
MessageStream |
getActorStream()
Returns the actor stream for the actor itself. |
java.lang.String |
getAddress()
Returns the actor's address |
Broker |
getBroker()
Returns the stream back to the link for error packets |
protected long |
getCurrentTimeActual()
|
int |
getThreadMax()
|
boolean |
isClosed()
Tests if the stream is closed. |
boolean |
isPacketAvailable()
Returns true if a message is available. |
void |
message(java.lang.String to,
java.lang.String from,
java.io.Serializable value)
Sends a message |
void |
messageError(java.lang.String to,
java.lang.String from,
java.io.Serializable value,
BamError error)
Sends a message |
void |
query(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable query)
Query an entity |
void |
queryError(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable query,
BamError error)
Query an entity |
void |
queryResult(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable value)
Query an entity |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MultiworkerMailbox(MessageStream actorStream,
Broker broker,
int threadMax)
public MultiworkerMailbox(java.lang.String address,
MessageStream actorStream,
Broker broker,
int threadMax)
| Method Detail |
|---|
protected MailboxWorker createWorker()
public int getThreadMax()
public java.lang.String getAddress()
getAddress in interface MessageStreampublic boolean isPacketAvailable()
public Broker getBroker()
getBroker in interface MessageStreampublic MessageStream getActorStream()
Mailbox
getActorStream in interface Mailbox
public void message(java.lang.String to,
java.lang.String from,
java.io.Serializable value)
message in interface MessageStreamto - the target actor's addressfrom - the source actor's addressvalue - the message payload
public void messageError(java.lang.String to,
java.lang.String from,
java.io.Serializable value,
BamError error)
messageError in interface MessageStreamto - the target actor's addressfrom - the source actor's addressvalue - the message payloaderror - the message error
public void query(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable query)
query in interface MessageStreamid - the query identifier used to match requests with responsesto - the service actor's addressfrom - the client actor's addressquery - the query payload
public void queryResult(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable value)
queryResult in interface MessageStreamid - the query identifier used to match requests with responsesto - the client actor's addressfrom - the service actor's addressvalue - the result payload
public void queryError(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable query,
BamError error)
queryError in interface MessageStreamid - the query identifier used to match requests with responsesto - the client actor's addressfrom - the service actor's addressquery - the query payloaderror - additional error informationprotected final void enqueue(Packet packet)
protected void dispatch(Packet packet)
protected Packet dequeue()
public void close()
Mailbox
close in interface Mailboxclose in interface java.io.Closeableprotected long getCurrentTimeActual()
public boolean isClosed()
MessageStream
isClosed in interface MessageStreampublic 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 | |||||||||