PaP
Class GAI

java.lang.Object
  |
  +--PaP.GAI
All Implemented Interfaces:
java.io.Serializable

public class GAI
extends java.lang.Object
implements java.io.Serializable

Global Actor Identifier (GAI) is used for identifier to all entities in the PaP architecture.

See Also:
Serialized Form

Field Summary
private  java.lang.String address
          Holds the unique IP-address for a node
private static java.util.Hashtable htRMIhandles
          Holds cached RMI handles for PNES and PAS objects
private static boolean initialized
           
private  java.lang.String name
          Unique Actor name
private  java.lang.String node
          Node/PNES name; there can only be one PNES per node
private  java.lang.String pas
          PAS name; could be multiple PASs per node
private  java.lang.String type
          Type of the GAI; can be either "PNES", "PAS", "Actor", "RoleSession"
 
Constructor Summary
GAI(java.lang.String pGAIString)
          Creates a new GAI from the specified string.
GAI(java.lang.String pType, java.lang.String pNode, java.lang.String pPas, java.lang.String pName)
          Creates a new GAI with the specified type, node, pas and actorname.
 
Method Summary
 boolean equalTo(GAI pGAI)
          Tests equality of this GAI to another one.
 java.lang.String getAddress()
          Returns the address value.
 java.lang.String getGAI()
          Utility to retrun the GAI address string representation of this GAI object.
 java.lang.String getName()
          Returns the name value.
 java.lang.String getNode()
          Returns the node value.
 java.lang.String getPAS()
          Returns the PAS value.
 GAI getPASGAI()
          Returns the GAI of the PAS of this GAI.
 java.lang.String getType()
          Returns the type value.
 PASInterface pasHandle(BaseFrame bf)
          Returns the PASInterface handle for a GAI of a PAS object.
 boolean pluggable(GAI pLocation)
          Tests pluggability of this GAI into another one.
 PNESInterface pnesHandle(BaseFrame bf)
          Returns the PNESInterface handle for a GAI of a PNES object.
static GAI String2GAI(java.lang.String pS)
          Creates a new GAI object with the GAI address being compiled from parameter pS.
 java.lang.String toString()
          Utility to retrun the GAI address string representation of this GAI object.
static java.lang.String toString(GAI obj)
          Utility to retrun the GAI address string representation of this GAI object.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

type

private java.lang.String type
Type of the GAI; can be either "PNES", "PAS", "Actor", "RoleSession"

node

private java.lang.String node
Node/PNES name; there can only be one PNES per node

address

private java.lang.String address
Holds the unique IP-address for a node

pas

private java.lang.String pas
PAS name; could be multiple PASs per node

name

private java.lang.String name
Unique Actor name

htRMIhandles

private static java.util.Hashtable htRMIhandles
Holds cached RMI handles for PNES and PAS objects

initialized

private static boolean initialized
Constructor Detail

GAI

public GAI(java.lang.String pType,
           java.lang.String pNode,
           java.lang.String pPas,
           java.lang.String pName)
Creates a new GAI with the specified type, node, pas and actorname.
Parameters:
pType -  
pNode -  
pPas -  
pName -  

GAI

public GAI(java.lang.String pGAIString)
Creates a new GAI from the specified string. This must be a string form of a GAI.
Method Detail

equalTo

public boolean equalTo(GAI pGAI)
Tests equality of this GAI to another one.
Parameters:
pGAI - The other GAI to test for equality.
Returns:
true if this GAI is equal to pGAI.

getAddress

public java.lang.String getAddress()
Returns the address value.

getGAI

public java.lang.String getGAI()
Utility to retrun the GAI address string representation of this GAI object.
Returns:
The GAI address string representation of this GAI object.

getName

public java.lang.String getName()
Returns the name value.

getNode

public java.lang.String getNode()
Returns the node value.

getPAS

public java.lang.String getPAS()
Returns the PAS value.

getPASGAI

public GAI getPASGAI()
Returns the GAI of the PAS of this GAI.

getType

public java.lang.String getType()
Returns the type value.

pasHandle

public PASInterface pasHandle(BaseFrame bf)
                       throws java.net.MalformedURLException
Returns the PASInterface handle for a GAI of a PAS object.
Parameters:
bf - BaseFrame to send debug trace info to.
Returns:
The PASInterface handle for this GAI.

pluggable

public boolean pluggable(GAI pLocation)
Tests pluggability of this GAI into another one.
Parameters:
pLocation - The other GAI to test for pluggability.
Returns:
true if this actor can be plugged in to pLocation.

pnesHandle

public PNESInterface pnesHandle(BaseFrame bf)
                         throws java.net.MalformedURLException
Returns the PNESInterface handle for a GAI of a PNES object.
Parameters:
bf - BaseFrame to send debug trace info to.
Returns:
The PNESInterface handle for this GAI.

String2GAI

public static GAI String2GAI(java.lang.String pS)
Creates a new GAI object with the GAI address being compiled from parameter pS.
Parameters:
pS - The new address that shall be assigned to the new GAI object
Returns:
The new GAI object

toString

public java.lang.String toString()
Utility to retrun the GAI address string representation of this GAI object.
Overrides:
toString in class java.lang.Object
Returns:
The GAI address string representation of this GAI object.

toString

public static java.lang.String toString(GAI obj)
Utility to retrun the GAI address string representation of this GAI object.
Returns:
The GAI address string representation of this GAI object.