public interface Factory extends TargetActor
Modifier and Type | Method and Description |
---|---|
void |
defineActorType(String actorType,
Class clazz)
Bind an actor type to a Class.
|
ActorFactory |
getActorFactory(String actorType)
Returns the requested actor factory.
|
Actor |
newActor(String actorType)
Creates a new actor.
|
Actor |
newActor(String actorType,
Mailbox mailbox)
Creates a new actor.
|
Actor |
newActor(String actorType,
Mailbox mailbox,
Actor parent)
Creates a new actor.
|
void |
registerActorFactory(ActorFactory actorFactory)
Register an actor factory.
|
setExceptionHandler
acceptEvent, acceptRequest, getActorType, getAncestor, getFactory, getMailbox, getMatch, getParent, hasDataItem, setInitialBufferCapacity
void defineActorType(String actorType, Class clazz) throws Exception
actorType
- The actor type.clazz
- The class of the actor.Exception
void registerActorFactory(ActorFactory actorFactory) throws Exception
actorFactory
- An actor factory.Exception
ActorFactory getActorFactory(String actorType) throws Exception
actorType
- The actor type.Exception
Actor newActor(String actorType) throws Exception
actorType
- The actor type.Exception
Actor newActor(String actorType, Mailbox mailbox) throws Exception
actorType
- The actor type.mailbox
- A mailbox which may be shared with other actors, or null.Exception
Actor newActor(String actorType, Mailbox mailbox, Actor parent) throws Exception
actorType
- The actor type.mailbox
- A mailbox which may be shared with other actors, or null.parent
- The parent actor to which unrecognized requests are forwarded, or null.Exception
Copyright © 2012. All Rights Reserved.