com.caucho.bam.broker
Class HashMapBroker
java.lang.Object
com.caucho.bam.broker.AbstractBrokerStream
com.caucho.bam.broker.AbstractBroker
com.caucho.bam.broker.AbstractManagedBroker
com.caucho.bam.broker.HashMapBroker
- All Implemented Interfaces:
- Broker, ManagedBroker, MessageStream
public class HashMapBroker
- extends AbstractManagedBroker
The abstract implementation of an 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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
HashMapBroker
public HashMapBroker(java.lang.String address)
getAddress
public java.lang.String getAddress()
- Returns the address for the broker itself.
- Specified by:
getAddress in interface MessageStream- Overrides:
getAddress in class AbstractBroker
getMailbox
public Mailbox getMailbox(java.lang.String address)
- Returns the actor stream for the given address.
- Specified by:
getMailbox in interface Broker- Overrides:
getMailbox in class AbstractBroker
- Parameters:
address - the address of the mailbox
- Returns:
- the mailbox with the given address or null
addMailbox
public void addMailbox(Mailbox mailbox)
- Adds a new actor to the broker.
- Specified by:
addMailbox in interface Broker- Specified by:
addMailbox in interface ManagedBroker- Overrides:
addMailbox in class AbstractManagedBroker
removeMailbox
public void removeMailbox(MessageStream actor)
- Removes an actor from the broker.