public class HashMapBroker extends AbstractManagedBroker
MessageStream
returns query errors for RPC packets, and ignores unknown packets
for messages and presence announcement.
Most developers will use SkeletonActorFilter
or SimpleActor
because those classes use
introspection with @Message
annotations
to simplify Actor development.Constructor and Description |
---|
HashMapBroker(java.lang.String address) |
Modifier and Type | Method and Description |
---|---|
void |
addMailbox(java.lang.String address,
Mailbox mailbox)
Adds a new actor to the broker.
|
java.lang.String |
getAddress()
Returns the address for the broker itself.
|
Mailbox |
getMailbox(java.lang.String address)
Returns the actor stream for the given address.
|
void |
removeMailbox(MessageStream actor)
Removes an actor from the broker.
|
createAgent, createAgent, createClient, createMailbox, createMailbox, isClosed, removeMailbox
close, getBroker, getBrokerMailbox, getQueueFullHandler, setQueueFullHandler
getQueryErrorStream, message, messageError, query, queryError, queryResult, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
close, getBrokerMailbox, getQueueFullHandler
getBroker, message, messageError, query, queryError, queryResult
public java.lang.String getAddress()
getAddress
in interface MessageStream
getAddress
in class AbstractBroker
public Mailbox getMailbox(java.lang.String address)
getMailbox
in interface Broker
getMailbox
in class AbstractBroker
address
- the address of the mailboxpublic void addMailbox(java.lang.String address, Mailbox mailbox)
addMailbox
in interface Broker
addMailbox
in interface ManagedBroker
addMailbox
in class AbstractManagedBroker
public void removeMailbox(MessageStream actor)