|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.rmi.server.RemoteObject | +--java.rmi.server.RemoteServer | +--java.rmi.server.UnicastRemoteObject | +--PaP.RMIServer | +--PaP.PAS
This class is the implementation of PaP layer PAS. A class instance executes within its separate JVM, and the JVM will contain the PAS functionality of the PAS, and in addition to all the actor instances that is controlled by this PAS. The JVM contains at least two threads, one to serve external requests and the other to serve actor instances.
Field Summary | |
private java.lang.Thread |
actorServe
The actor serve thread |
private ActorFactory |
af
Functionality to create actor instances and to assign correct behaviour by downloading the desired manuascript class. |
private ActorManager |
am
The actor manager that keeps information about all actor instances controlled by this PAS |
protected java.lang.String |
nodeProfile
Default node profile defined at PNES startup |
private GAI |
ownPNES
Own address identifier |
private boolean |
waitForNotify
Indication whether or not the separate thread that serves all the actors contained is activated. |
private java.util.Vector |
vRP
Queue of actor requests |
Fields inherited from class PaP.RMIServer |
bf, defaultCodebase, defaultHI, DSL, fh, ownGAI, policy |
Fields inherited from class java.rmi.server.UnicastRemoteObject |
csf, port, portFactoryParamTypes, portParamTypes, serialVersionUID, ssf |
Fields inherited from class java.rmi.server.RemoteServer |
log, logname |
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Constructor Summary | |
PAS()
Empty constructor only to throw Exception. |
Method Summary | |
private RequestResult |
actorChangeBehaviour(RequestPars pRP)
Changes behaviour for a newly created actor |
private Actor |
actorCreate(RequestPars pRP)
Creates one actor; director invokes this. |
private RequestResult |
actorPlugIn(RequestPars pRP)
Plugs in a newly created actor |
private RequestResult |
actorPlugOut(RequestPars pRP)
Remove an actor from the director's playing base |
RequestResult |
control(java.lang.String command,
java.lang.String[] pars)
Controls this PAS object, invokes its functionality, BaseFrame input field can trigger it |
static void |
main(java.lang.String[] argv)
|
void |
run()
Utility for the thread support. |
private void |
serveActor()
Serves the Actor requests from the queue of requests. |
void |
starter(java.lang.String[] argv)
To leave constructor empty, this method initializes data field values. |
Item |
status()
Status report of all contained information of this PNES object. |
RequestResult |
syncRequestFromActor(RequestPars pRP)
Handles requests from Actor objects |
RequestResult |
syncRequestFromPNES(RequestPars pRP)
Handles requests from PNES objects. |
Methods inherited from class PaP.RMIServer |
actionPerformed, addCodebase, getGAI, init, term, unbind |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
|
Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub, writeObject |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait |
Field Detail |
private GAI ownPNES
private ActorManager am
private ActorFactory af
private boolean waitForNotify
private java.util.Vector vRP
private java.lang.Thread actorServe
protected java.lang.String nodeProfile
Constructor Detail |
public PAS() throws java.lang.Exception
Method Detail |
public void run()
run
in interface java.lang.Runnable
public void starter(java.lang.String[] argv) throws java.lang.Exception
argv
- Command line style arguments from startPaP with codebase,
policy, homeinterface and debugserver.public Item status()
status
in class RMIServer
private void serveActor() throws java.lang.Exception
private Actor actorCreate(RequestPars pRP) throws java.lang.Exception
pRP
- Request parametersprivate RequestResult actorPlugIn(RequestPars pRP) throws java.lang.Exception
pRP
- Request parametersprivate RequestResult actorChangeBehaviour(RequestPars pRP) throws java.lang.Exception
pRP
- Request parametersprivate RequestResult actorPlugOut(RequestPars pRP) throws java.lang.Exception
pRP
- Request parameterspublic RequestResult syncRequestFromPNES(RequestPars pRP) throws java.lang.Exception
syncRequestFromPNES
in interface PASInterface
pRP
- The request.public RequestResult syncRequestFromActor(RequestPars pRP) throws java.lang.Exception
syncRequestFromActor
in interface PASInterface
pRP
- The requestpublic RequestResult control(java.lang.String command, java.lang.String[] pars) throws java.lang.Exception
control
in interface PASInterface
command
- First command line argument, used to denote a command namepars[]
- Rest of the command line arguments, used as parameters for the denoted commandpublic static void main(java.lang.String[] argv) throws java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |