MicroTester.v2_0
Class MicroTesterBase

java.lang.Object
  |
  +--MicroTAPAS.MicroActor
        |
        +--MicroTAPAS.MicroApplicationActor
              |
              +--MicroTAPAS.mobility.MobilityApplicationActor
                    |
                    +--MicroTester.v2_0.MicroTesterBase
All Implemented Interfaces:
ControlInterface, MicroActorInterface, java.io.Serializable
Direct Known Subclasses:
MicroTester1, MicroTester2

abstract class MicroTesterBase
extends MobilityApplicationActor


Field Summary
 TesterInterface ai
          Instance of own interface
protected  java.awt.Color bgColor
          Variable to hold the background color of the main application window.
static boolean DEBUG
          Determines whether debug info to be sent to debug-server
 RoleSession initialRoleSession
          The initial role session created when actor is created.
private  boolean initiated
          Determines if the client is initiated
private static java.lang.String LF
          Line-feed
private  ScriptHandler sh
          The entity to handle execution of commands.
private static int stInitial
          Initial actor state value
private static int stInitialized
          Initialized actor state value
private static int stUpgrade
          Upgrade actor sate value
protected  java.lang.String title
          Variable to hold the title of the main application window.
private  TesterMainWindow tmw
          The main application window
 
Fields inherited from class MicroTAPAS.mobility.MobilityApplicationActor
doRegister, isRegistered
 
Fields inherited from class MicroTAPAS.MicroActor
bf, context, debug, fh, properties
 
Constructor Summary
MicroTesterBase(java.lang.String pTitle, java.awt.Color pColor)
          Constructor
 
Method Summary
 void closeWindow()
          Close the application window
 void createInterface(java.lang.Object pActorInterface)
          Re-constructs an actor based on the information stored in its interface.
 java.lang.Object getInterface()
          Constructs an interface of this this actor, wherein all essential inforamtion about the actor should be stored.
private  void makeWindow(java.lang.String title, java.awt.Color color)
          Show the application window
 RequestResult mobilityActorEntry(RequestPars rp)
          Common entry point for all mobile application actors
private  RequestResult stateTransition(RequestPars pRP)
          This is the main behaviour definition for this actor.
 void term()
          Gives this Actor instance a chance to clean up when the DebugWindow is closed; should only be called if no more roleSessions in RoleSessionCollection (except for ActorBehaviourChange).
 RequestResult testerControl(java.lang.String cmd, java.lang.String[] args, boolean expectSuccess)
          Method to control this Tester application.
private  void updateInterface()
          Updates this actor's interface
 
Methods inherited from class MicroTAPAS.mobility.MobilityApplicationActor
actorChangeBehaviour, actorChangeBehaviour, actorMove, actorRegister, actorRegisterCancel, applicationActorEntry, cleanUp, control, getMAGAI, getMMGAI, help, init, status
 
Methods inherited from class MicroTAPAS.MicroApplicationActor
actorBehaviourPlugIn, actorBehaviourPlugOut, ActorCapabilities, actorEntry, ActorPlay, actorPlugIn, actorPlugOut, anyOtherRequestType, closeBF, playChangesPlugIn, playPlugIn, playPlugOut, requestToActor, RoleSessionAction, subscribeCancel, subscribeReport, subscribeRequest
 
Methods inherited from class MicroTAPAS.MicroActor
findRoleSession, getGAI, start, terminalMove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

public static final boolean DEBUG
Determines whether debug info to be sent to debug-server

See Also:
Constant Field Values

LF

private static final java.lang.String LF
Line-feed

See Also:
Constant Field Values

tmw

private TesterMainWindow tmw
The main application window


ai

public TesterInterface ai
Instance of own interface


initiated

private boolean initiated
Determines if the client is initiated


stInitial

private static final int stInitial
Initial actor state value

See Also:
Constant Field Values

stInitialized

private static final int stInitialized
Initialized actor state value

See Also:
Constant Field Values

stUpgrade

private static final int stUpgrade
Upgrade actor sate value

See Also:
Constant Field Values

initialRoleSession

public RoleSession initialRoleSession
The initial role session created when actor is created. Used when terminating.


title

protected java.lang.String title
Variable to hold the title of the main application window.


bgColor

protected java.awt.Color bgColor
Variable to hold the background color of the main application window.


sh

private ScriptHandler sh
The entity to handle execution of commands.

Constructor Detail

MicroTesterBase

public MicroTesterBase(java.lang.String pTitle,
                       java.awt.Color pColor)
Constructor

Method Detail

mobilityActorEntry

public RequestResult mobilityActorEntry(RequestPars rp)
                                 throws java.lang.Exception
Common entry point for all mobile application actors

Specified by:
mobilityActorEntry in class MobilityApplicationActor
Parameters:
rp - TAPAS style request
Returns:
TAPAS style result
java.lang.Exception

stateTransition

private RequestResult stateTransition(RequestPars pRP)
                               throws java.lang.Exception
This is the main behaviour definition for this actor.

Parameters:
pRP - Request parameters
Returns:
Success or failure indication
java.lang.Exception

testerControl

public RequestResult testerControl(java.lang.String cmd,
                                   java.lang.String[] args,
                                   boolean expectSuccess)
Method to control this Tester application. Input from a dialog window may trigger action. Input from a list of preselected actions is also a possibility.

Parameters:
cmd - The TAPAS command to be executed.
args - Command parameters (if any).
Returns:
The result of the operation.

makeWindow

private void makeWindow(java.lang.String title,
                        java.awt.Color color)
Show the application window


closeWindow

public void closeWindow()
Close the application window


term

public void term()
Gives this Actor instance a chance to clean up when the DebugWindow is closed; should only be called if no more roleSessions in RoleSessionCollection (except for ActorBehaviourChange).

Specified by:
term in interface MicroActorInterface
Overrides:
term in class MobilityApplicationActor

createInterface

public void createInterface(java.lang.Object pActorInterface)
Re-constructs an actor based on the information stored in its interface.

Specified by:
createInterface in class MobilityApplicationActor

getInterface

public java.lang.Object getInterface()
Constructs an interface of this this actor, wherein all essential inforamtion about the actor should be stored.

Specified by:
getInterface in class MobilityApplicationActor
Returns:
This actor's interface.

updateInterface

private void updateInterface()
Updates this actor's interface



The Telematics Architecture for Plug-and-Play Systems (TAPAS) is a research project undertaken by the Norwegian University of Science and Technology's Telematics department which aims at developing an architecture for network-based service systems with a) flexibility and adaptability, b) robustness and survivability, and c) QoS awareness and resource control.

More information can be found at the project's homepage at http://tapas.item.ntnu.no and the project manager, Professor Finn Arve Aagesen, can be reached at finn.arve.aagesen@item.ntnu.no.