|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--MicroTAPAS.MicroBase
|
+--MicroTAPAS.MicroPNES
This class is the implementation of MicroTAPAS layer MicroPNES, and is largely based on a combination of TAPAS.PNES and TAPAS.PAS
| Field Summary | |
protected MicroActorFactory |
af
Functionality to create actor instances and to assign correct behaviour by downloading the desired manuscript class |
protected MicroActorManager |
am
The actor manager that keeps information about all actor instances controlled by this MicroPNES |
private ComCenter |
cc
The entity responsible for communication between different nodes |
private static boolean |
DEBUG
Determines whether debug info to be sent to debug-server |
private GAI |
managerGAI
|
private GAI |
mobilityGAI
The address of the local Mobility entity (MM or MA) |
private Node |
node
|
protected java.lang.Thread |
requestThread
Thread that takes care of requests |
protected boolean |
requestThreadAlive
Boolean which determines if the thread has died |
private ScriptHandler |
sh
Entity that takes care of running scripts at start-up (if any) |
protected boolean |
waitForNotify
Used for requests |
protected java.util.Vector |
vRP
Vector of incomming RequestPars |
| Fields inherited from class MicroTAPAS.MicroBase |
bf, codebase, debug, debugServer, homeInterface, maInterface, mmInterface, nodeCaps, nodeProfile, properties, selfInterface |
| Constructor Summary | |
MicroPNES()
Empty constructor so that it can be instantiated after dynamic loading of its class |
|
| Method Summary | |
private RequestResult |
actorChangeBehaviour(RequestPars rpars)
Changes behaviour for a newly created actor. |
private MicroActor |
actorCreate(RequestPars rpars)
Creates one actor locally; director invokes this. |
private RequestResult |
actorDiscover(RequestPars pRP)
Method to discover an actor |
private RequestResult |
actorPlugIn(RequestPars rpars)
Plugs in a new actor at this node. |
private RequestResult |
actorPlugOut(RequestPars rpars)
Remove an actor from the director's playing base |
void |
addBFCommands()
Adds the following command-lines to the BaseFrame |
private RequestResult |
capabilitiyValidate(RequestPars rpars)
Verifies that an actor's required capabilities are met prior to plugging in the new actor, or performing an actorChangeBehaviour. |
void |
cleanUp()
Gives this TAPAS instance a chance to clean up when the DebugWindow is closed (i.e this TAPAS node is shutting down). |
RequestResult |
control(java.lang.String command,
java.lang.String[] pars)
Controls this MicroPNES object, invokes its functionality. |
private CapabilitySet |
getActorCapabilities(RequestPars pRP)
Method to load an actor's required capabilities. |
private java.util.Hashtable |
getActorProperties(RequestPars pRP)
Method to load an actor's properties. |
private void |
plugInMobility()
Private method to plug in a mobility support entity. |
private void |
plugOutMobility()
Private method to plug out the mobility support entity. |
void |
run()
Runs the thread for serving requests to Actors |
RequestResult |
sendToPNES(RequestPars rpars)
Sends a RequestPars to any non-local PNES instance (there can be only one PNES per node) |
private void |
serveRequests()
Thread that serves requests to Actors (Asynchronous communication) |
void |
starter(java.lang.String[] argv)
Initializes this MicroPNES instance |
Item |
status()
Status report of MicroPNES in Item hierarchy of information elements |
RequestResult |
syncRequestFromActor(RequestPars rpars)
Handles requests from Actor objects |
RequestResult |
syncRequestFromCC(RequestPars rpars)
Handles incomming requests from other nodes. |
RequestResult |
syncRequestFromPNES(RequestPars rpars)
Handles requests from PNES objects |
void |
terminalMove(java.lang.String oldNode,
java.lang.String newNode)
Method to update all relevant properties once a terminal has moved. |
void |
unbind()
Closes down window |
| Methods inherited from class MicroTAPAS.MicroBase |
getGAI, init |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final boolean DEBUG
protected java.util.Vector vRP
protected boolean waitForNotify
protected java.lang.Thread requestThread
protected boolean requestThreadAlive
protected MicroActorManager am
protected MicroActorFactory af
private ComCenter cc
private ScriptHandler sh
private GAI mobilityGAI
private GAI managerGAI
private Node node
| Constructor Detail |
public MicroPNES()
throws java.lang.Exception
| Method Detail |
public void starter(java.lang.String[] argv)
throws java.lang.Exception
argv - Command line style arguments from startPaP with
codebase, policy, homeinterface and debugserver.
java.lang.Exceptionprivate void plugInMobility()
private void plugOutMobility()
public RequestResult control(java.lang.String command,
java.lang.String[] pars)
throws java.lang.Exception
control in interface MicroPNESInterfacecommand - the command to be performed
java.lang.Exception
public RequestResult syncRequestFromCC(RequestPars rpars)
throws java.lang.Exception
java.lang.Exception
public RequestResult syncRequestFromPNES(RequestPars rpars)
throws java.lang.Exception
syncRequestFromPNES in interface MicroPNESInterfacerpars - the request
java.lang.Exception
public RequestResult syncRequestFromActor(RequestPars rpars)
throws java.lang.Exception
rpars - the request
java.lang.Exception
private MicroActor actorCreate(RequestPars rpars)
throws java.lang.Exception
rpars - the request
java.lang.Exceptionprivate RequestResult actorPlugIn(RequestPars rpars)
rpars - request parameters
private RequestResult actorChangeBehaviour(RequestPars rpars)
throws java.lang.Exception
rpars - request parameters
java.lang.Exception
private RequestResult actorPlugOut(RequestPars rpars)
throws java.lang.Exception
rpars - request parameters
java.lang.Exceptionpublic void run()
run in interface java.lang.Runnable
private void serveRequests()
throws java.lang.Exception
java.lang.Exception
public RequestResult sendToPNES(RequestPars rpars)
throws java.lang.Exception
rpars - the request sent
java.lang.Exceptionprivate RequestResult actorDiscover(RequestPars pRP)
pRP - The request where pRP.receiver is the actor to be located
public void terminalMove(java.lang.String oldNode,
java.lang.String newNode)
terminalMove in class MicroBaseoldNode - The old nodenewNode - The new nodeprivate RequestResult capabilitiyValidate(RequestPars rpars)
rpars - request parameters
private CapabilitySet getActorCapabilities(RequestPars pRP)
pRP - TAPAS-style request parameters.
private java.util.Hashtable getActorProperties(RequestPars pRP)
pRP - TAPAS-style request parameters.
public void unbind()
throws java.lang.Exception
java.lang.Exceptionpublic void cleanUp()
cleanUp in interface ControlInterfacepublic Item status()
status in class MicroBase
public void addBFCommands()
throws java.lang.Exception
java.lang.Exception
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||