public class JAFactory extends JLPCActor implements Factory
JLPCActor.SMBuilder
Constructor and Description |
---|
JAFactory() |
Modifier and Type | Method and Description |
---|---|
void |
defineActorType(String actorType,
Class clazz)
Bind an actor type to a Class.
|
static ActorFactory |
getActorFactory(Actor actor,
String actorType)
Returns the requested actor factory.
|
ActorFactory |
getActorFactory(String actorType)
Returns the requested actor factory.
|
static Actor |
newActor(Actor actor,
String actorType)
Creates a new actor.
|
static Actor |
newActor(Actor actor,
String actorType,
Mailbox mailbox)
Creates a new actor.
|
static Actor |
newActor(Actor actor,
String actorType,
Mailbox mailbox,
Actor parent)
Creates a new actor.
|
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.
|
acceptEvent, acceptRequest, getActorType, getAncestor, getExceptionHandler, getFactory, getMailbox, getMailboxFactory, getMatch, getParent, hasDataItem, haveEvents, initialize, initialize, initialize, initialize, initialize, requirements, responseFrom, send, send, sendEvent, setExceptionHandler, setInitialBufferCapacity
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setExceptionHandler
acceptEvent, acceptRequest, getActorType, getAncestor, getFactory, getMailbox, getMatch, getParent, hasDataItem, setInitialBufferCapacity
public static ActorFactory getActorFactory(Actor actor, String actorType) throws Exception
actor
- The actor which is the factory or which has a factory as an ancestor.actorType
- The actor type.Exception
public static Actor newActor(Actor actor, String actorType) throws Exception
actor
- The actor which is the factory or which has a factory as an ancestor.actorType
- The actor type.Exception
public static Actor newActor(Actor actor, String actorType, Mailbox mailbox) throws Exception
actor
- The actor which is the factory or which has a factory as an ancestor.actorType
- The actor type.mailbox
- A mailbox which may be shared with other actors, or null.Exception
public static Actor newActor(Actor actor, String actorType, Mailbox mailbox, Actor parent) throws Exception
actor
- The actor which is the factory or which has a factory as an ancestor.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
public Actor newActor(String actorType, Mailbox mailbox) throws Exception
public Actor newActor(String actorType, Mailbox mailbox, Actor parent) throws Exception
public ActorFactory getActorFactory(String actorType) throws Exception
getActorFactory
in interface Factory
actorType
- The actor type.Exception
public void defineActorType(String actorType, Class clazz) throws Exception
defineActorType
in interface Factory
actorType
- The actor type.clazz
- The class of the actor.Exception
public void registerActorFactory(ActorFactory actorFactory) throws Exception
registerActorFactory
in interface Factory
actorFactory
- An actor factory.Exception
Copyright © 2012. All Rights Reserved.