MicroTAPAS
Class MicroPNES

java.lang.Object
  |
  +--MicroTAPAS.MicroBase
        |
        +--MicroTAPAS.MicroPNES
All Implemented Interfaces:
ControlInterface, MicroPNESInterface, java.lang.Runnable, java.io.Serializable

public class MicroPNES
extends MicroBase
implements MicroPNESInterface, java.lang.Runnable

This class is the implementation of MicroTAPAS layer MicroPNES, and is largely based on a combination of TAPAS.PNES and TAPAS.PAS

See Also:
Serialized Form

Field Summary
 
Fields inherited from class MicroTAPAS.MicroBase
bf
 
Constructor Summary
MicroPNES()
          Empty constructor so that it can be instantiated after dynamic loading of its class
 
Method Summary
 void addBFCommands()
          Adds the following command-lines to the BaseFrame
 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.
 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)
 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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MicroPNES

public MicroPNES()
          throws java.lang.Exception
Empty constructor so that it can be instantiated after dynamic loading of its class

Method Detail

starter

public void starter(java.lang.String[] argv)
             throws java.lang.Exception
Initializes this MicroPNES instance

Parameters:
argv - Command line style arguments from startPaP with codebase, policy, homeinterface and debugserver.
java.lang.Exception

control

public RequestResult control(java.lang.String command,
                             java.lang.String[] pars)
                      throws java.lang.Exception
Controls this MicroPNES object, invokes its functionality. BaseFrame input field can trigger it

Specified by:
control in interface MicroPNESInterface
Parameters:
command - the command to be performed
Returns:
TAPAS style result indication of the operation
java.lang.Exception

syncRequestFromCC

public RequestResult syncRequestFromCC(RequestPars rpars)
                                throws java.lang.Exception
Handles incomming requests from other nodes.

java.lang.Exception

syncRequestFromPNES

public RequestResult syncRequestFromPNES(RequestPars rpars)
                                  throws java.lang.Exception
Handles requests from PNES objects

Specified by:
syncRequestFromPNES in interface MicroPNESInterface
Parameters:
rpars - the request
Returns:
the result fo the request
java.lang.Exception

syncRequestFromActor

public RequestResult syncRequestFromActor(RequestPars rpars)
                                   throws java.lang.Exception
Handles requests from Actor objects

Parameters:
rpars - the request
Returns:
the result fo the request
java.lang.Exception

run

public void run()
Runs the thread for serving requests to Actors

Specified by:
run in interface java.lang.Runnable

sendToPNES

public RequestResult sendToPNES(RequestPars rpars)
                         throws java.lang.Exception
Sends a RequestPars to any non-local PNES instance (there can be only one PNES per node)

Parameters:
rpars - the request sent
Returns:
PaP style result
java.lang.Exception

terminalMove

public void terminalMove(java.lang.String oldNode,
                         java.lang.String newNode)
Method to update all relevant properties once a terminal has moved. Called by ActorContext.

Overrides:
terminalMove in class MicroBase
Parameters:
oldNode - The old node
newNode - The new node

unbind

public void unbind()
            throws java.lang.Exception
Closes down window

java.lang.Exception

cleanUp

public void cleanUp()
Gives this TAPAS instance a chance to clean up when the DebugWindow is closed (i.e this TAPAS node is shutting down).

Specified by:
cleanUp in interface ControlInterface

status

public Item status()
Status report of MicroPNES in Item hierarchy of information elements

Overrides:
status in class MicroBase
Returns:
Hierarchy of Item information elements

addBFCommands

public void addBFCommands()
                   throws java.lang.Exception
Adds the following command-lines to the BaseFrame

java.lang.Exception