com.caucho.bam.manager
Class SimpleBamManager

java.lang.Object
  extended by com.caucho.bam.manager.SimpleBamManager
All Implemented Interfaces:
BamManager

public class SimpleBamManager
extends java.lang.Object
implements BamManager

Broker is the hub which routes messages to actors.


Constructor Summary
SimpleBamManager(ManagedBroker broker)
           
 
Method Summary
 void addActor(java.lang.String address, ManagedActor actor)
          Adds an actor and creates a default mailbox
 void addMailbox(Mailbox mailbox)
          Adds a mailbox.
 Agent createAgent(MessageStream actorStream)
          Creates an agent
 Agent createAgent(MessageStream actorStream, MailboxType mailboxType)
          Creates an agent
 Mailbox createClient(Mailbox next, java.lang.String uid, java.lang.String resource)
           
 ActorSender createClient(java.lang.String uid, java.lang.String resource)
           
protected  Mailbox createMailbox(MessageStream actorStream, MailboxType mailboxType)
           
protected  Mailbox createMailbox(java.lang.String address, MessageStream actorStream, MailboxType mailboxType)
           
 ManagedBroker getBroker()
          Returns the managed broker
 void removeMailbox(Mailbox mailbox)
          Removes a mailbox.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleBamManager

public SimpleBamManager(ManagedBroker broker)
Method Detail

getBroker

public ManagedBroker getBroker()
Description copied from interface: BamManager
Returns the managed broker

Specified by:
getBroker in interface BamManager

addMailbox

public void addMailbox(Mailbox mailbox)
Adds a mailbox.

Specified by:
addMailbox in interface BamManager

removeMailbox

public void removeMailbox(Mailbox mailbox)
Removes a mailbox.

Specified by:
removeMailbox in interface BamManager

addActor

public void addActor(java.lang.String address,
                     ManagedActor actor)
Description copied from interface: BamManager
Adds an actor and creates a default mailbox

Specified by:
addActor in interface BamManager

createAgent

public Agent createAgent(MessageStream actorStream)
Creates an agent

Specified by:
createAgent in interface BamManager

createAgent

public Agent createAgent(MessageStream actorStream,
                         MailboxType mailboxType)
Creates an agent

Specified by:
createAgent in interface BamManager

createMailbox

protected Mailbox createMailbox(MessageStream actorStream,
                                MailboxType mailboxType)

createMailbox

protected Mailbox createMailbox(java.lang.String address,
                                MessageStream actorStream,
                                MailboxType mailboxType)

createClient

public Mailbox createClient(Mailbox next,
                            java.lang.String uid,
                            java.lang.String resource)
Specified by:
createClient in interface BamManager
Returns:

createClient

public ActorSender createClient(java.lang.String uid,
                                java.lang.String resource)
Specified by:
createClient in interface BamManager

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object