Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

eu.genesys.kernel
Class ComponentId  view ComponentId download ComponentId.java

java.lang.Object
  extended byeu.genesys.kernel.ComponentId

public class ComponentId
extends java.lang.Object

This class defines component identifier.

Each GeneSyS component must have a unique identifier that is called component id. The structure of component id is as follows

componentId = coreId.siteId.agentId

Each GeneSyS agent should know about a single instance of the core also referred as a "default core". Specifying location of the default core (usually the core nearest to the agent in some sense) is an off-line procedure (e.g. default core is specified in the configuration file of the agent). Agents should use "0.0.0" as a componentId when referencing the core. Values of "NNN.0.0" are reserved for core-to-core communications. Version one of GeneSyS has only one instance of the core that is a default core.
When agent registers for the first time it should only pass its siteId to the core. It should be done by setting coreId and agentID to "0". Core responds with the fully qualified componentId for given agent.

Version:
$Revision: 1.6 $$Date: 2003/10/27 13:02:41 $

Field Summary
private  java.lang.String agentId
           
private  java.lang.String coreId
           
static ComponentId DEFAULT_CORE
          Default core identification.
static java.lang.String DELIMITER
          Id Field delimiter.
private  java.lang.String siteId
           
 
Constructor Summary
ComponentId()
          Constructs uninitialized component id.
ComponentId(java.lang.String id)
          Constructs component id from string.
ComponentId(java.lang.String coreId, java.lang.String siteId, java.lang.String agentId)
          Constructs fully qualified component id.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares this object against the specified object.
 java.lang.String getAgentId()
           
 java.lang.String getCoreId()
           
 java.lang.String getSiteId()
           
 void setAgentId(java.lang.String agentId)
           
 void setCoreId(java.lang.String coreId)
           
 void setSiteId(java.lang.String siteId)
           
 java.lang.String toString()
          Returns Component Id string representation.
 java.lang.String toXml()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_CORE

public static final ComponentId DEFAULT_CORE
Default core identification.


DELIMITER

public static final java.lang.String DELIMITER
Id Field delimiter.

See Also:
Constant Field Values

coreId

private java.lang.String coreId

siteId

private java.lang.String siteId

agentId

private java.lang.String agentId
Constructor Detail

ComponentId

public ComponentId()
Constructs uninitialized component id.


ComponentId

public ComponentId(java.lang.String coreId,
                   java.lang.String siteId,
                   java.lang.String agentId)
Constructs fully qualified component id. To create component id for registration use (null, siteId, null) as parameters.


ComponentId

public ComponentId(java.lang.String id)
            throws ComponentIdFormatException
Constructs component id from string.

Method Detail

getCoreId

public java.lang.String getCoreId()

setCoreId

public void setCoreId(java.lang.String coreId)

getSiteId

public java.lang.String getSiteId()

setSiteId

public void setSiteId(java.lang.String siteId)

getAgentId

public java.lang.String getAgentId()

setAgentId

public void setAgentId(java.lang.String agentId)

toString

public java.lang.String toString()
Returns Component Id string representation.


toXml

public java.lang.String toXml()

equals

public boolean equals(java.lang.Object obj)
Compares this object against the specified object.