aa.core
Class ActorName

java.lang.Object
  extended byaa.core.ActorName
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable

public class ActorName
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable

This class creates a window for MAA (Multi-Actor Architecture).
An actor name is represented in two different types:

History:

Version:
$Date: 2008/01/01 00:23:48 $ $Revision: 1.1 $
Author:
Myeong-Wuk Jang
See Also:
Serialized Form

Field Summary
private  boolean m_bValid
           
private  int m_iID
           
private  java.lang.String m_strHostAddress
           
private  java.lang.String m_strLocationAddress
           
 
Constructor Summary
ActorName(ActorName p_anActor)
          Creates unique actor name for an actor with another actor name.
ActorName(java.lang.String p_strUAN)
          Creates unique actor name for an actor with string representation of a UAN.
ActorName(java.lang.String p_strHostAddress, int p_iID)
          Creates unique actor name for an actor with host address of the platform where the actor is created, and unique identifier ot the actor.
 
Method Summary
 int compareTo(java.lang.Object p_objOther)
          Compares this actor name with the specified actor name for ordering.
 boolean equals(ActorName p_anOther)
          Checkes whether this actor name is same as the specified actor name.
 boolean equals(java.lang.Object p_objOther)
          Checkes whether this actor name is same as the specified object.
 java.lang.String getHostAddress()
          Returns the host address of this actor name.
 int getID()
          Returns the identification number of this actor name.
 java.lang.String getLAN()
          Returns the LAN of this actor name.
 java.lang.String getLocationAddress()
          Returns the current location address.
 java.lang.String getUAN()
          Returns the UAN of this actor name.
 boolean isValid()
          Checkes wheter the current actor name is valid.
 void setLocationAddress(java.lang.String p_strLocationAddress)
          Sets the current location address.
 java.lang.String toString()
          Returns a string representation of this object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_iID

private int m_iID

m_strHostAddress

private java.lang.String m_strHostAddress

m_strLocationAddress

private java.lang.String m_strLocationAddress

m_bValid

private boolean m_bValid
Constructor Detail

ActorName

public ActorName(java.lang.String p_strHostAddress,
                 int p_iID)
Creates unique actor name for an actor with host address of the platform where the actor is created, and unique identifier ot the actor.

Parameters:
p_strHostAddress - the host address of this platform.
p_iID - a unique identifier of this actor.

ActorName

public ActorName(ActorName p_anActor)
Creates unique actor name for an actor with another actor name.

Parameters:
p_anActor - another actor name to be copied.

ActorName

public ActorName(java.lang.String p_strUAN)
Creates unique actor name for an actor with string representation of a UAN.

Parameters:
p_strUAN - the string representation of a UAN.
Method Detail

compareTo

public int compareTo(java.lang.Object p_objOther)
Compares this actor name with the specified actor name for ordering.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
p_objOther - another object to be compared.
Returns:
1 if this actor name > the other actor name;
0 if this actor name == the other actor name;
-1 otherwise.

equals

public boolean equals(java.lang.Object p_objOther)
Checkes whether this actor name is same as the specified object.

Parameters:
p_objOther - the reference to actor name of another actor to be checked
Returns:
true if this actor name is the same as the specified object;
false otherwise.

equals

public boolean equals(ActorName p_anOther)
Checkes whether this actor name is same as the specified actor name.

Parameters:
p_anOther - the name of another actor to be checked.
Returns:
true if this actor name is the same as the specified actor name;
false otherwise.

getID

public int getID()
Returns the identification number of this actor name.

Returns:
the identification number of this actor name.

getHostAddress

public java.lang.String getHostAddress()
Returns the host address of this actor name.

Returns:
the host address of this actor name.

setLocationAddress

public void setLocationAddress(java.lang.String p_strLocationAddress)
Sets the current location address.

Parameters:
p_strLocationAddress - the current location address.

getLocationAddress

public java.lang.String getLocationAddress()
Returns the current location address.

Returns:
the current location address.

isValid

public boolean isValid()
Checkes wheter the current actor name is valid.

Returns:
true if the current actor name is valid;
false otherwise.

getUAN

public java.lang.String getUAN()
Returns the UAN of this actor name.

Returns:
the UAN of this actor name.

getLAN

public java.lang.String getLAN()
Returns the LAN of this actor name.

Returns:
the LAN of this actor name.

toString

public java.lang.String toString()
Returns a string representation of this object.

Returns:
a string representation of this object.
UAN if the location of an actor is same as the original location where the actor was created,
UAL otherwise.