com.caucho.bam.actor
Class SimpleActor

java.lang.Object
  extended by com.caucho.bam.stream.AbstractMessageStream
      extended by com.caucho.bam.actor.SimpleActor
All Implemented Interfaces:
Actor, ActorHolder, ManagedActor, MessageStream
Direct Known Subclasses:
AbstractCloudActor, BamJmsService, BamLogService, BamMailService, BamPhpActor, BamPhpRootService, DeployActor, JMXService, JmxServiceImpl, LicenseActor, ManagerActor, ResinActor, ServerLinkActor, WatchdogActor

public class SimpleActor
extends AbstractMessageStream
implements ManagedActor, ActorHolder

Base class for implementing an Agent.


Constructor Summary
SimpleActor()
           
SimpleActor(java.lang.String address, Broker broker)
           
 
Method Summary
 Actor getActor()
          Returns the custom MessageStream to the Broker, so the Broker can send messages to the agent.
 java.lang.String getAddress()
          Returns the address at the end of the stream.
 Broker getBroker()
          Returns the owning broker
 Mailbox getMailbox()
           
 ActorSender getSender()
          Returns the ActorClient to the link for convenient message calls.
 void setAddress(java.lang.String address)
           
 void setBroker(Broker broker)
           
 void setMailbox(Mailbox mailbox)
           
 
Methods inherited from class com.caucho.bam.stream.AbstractMessageStream
isClosed, message, messageError, query, queryError, queryResult, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.caucho.bam.stream.MessageStream
isClosed, message, messageError, query, queryError, queryResult
 

Constructor Detail

SimpleActor

public SimpleActor()

SimpleActor

public SimpleActor(java.lang.String address,
                   Broker broker)
Method Detail

getAddress

public java.lang.String getAddress()
Description copied from class: AbstractMessageStream
Returns the address at the end of the stream.

Specified by:
getAddress in interface ActorHolder
Specified by:
getAddress in interface MessageStream
Overrides:
getAddress in class AbstractMessageStream

setAddress

public void setAddress(java.lang.String address)
Specified by:
setAddress in interface ActorHolder
Specified by:
setAddress in interface ManagedActor

getActor

public Actor getActor()
Returns the custom MessageStream to the Broker, so the Broker can send messages to the agent. Developers will customize the ActorStream to receive messages from the Broker.

Specified by:
getActor in interface ActorHolder
Specified by:
getActor in interface ManagedActor

getSender

public ActorSender getSender()
Returns the ActorClient to the link for convenient message calls.


getMailbox

public Mailbox getMailbox()
Specified by:
getMailbox in interface ActorHolder
Specified by:
getMailbox in interface ManagedActor

setMailbox

public void setMailbox(Mailbox mailbox)
Specified by:
setMailbox in interface ActorHolder
Specified by:
setMailbox in interface ManagedActor

getBroker

public Broker getBroker()
Description copied from interface: MessageStream
Returns the owning broker

Specified by:
getBroker in interface ActorHolder
Specified by:
getBroker in interface MessageStream
Overrides:
getBroker in class AbstractMessageStream

setBroker

public void setBroker(Broker broker)
Specified by:
setBroker in interface ActorHolder
Specified by:
setBroker in interface ManagedActor