public class BasicComponentIdentifier extends java.lang.Object implements IComponentIdentifier, java.lang.Cloneable, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
name
The component name.
|
EMPTY_COMPONENTIDENTIFIERS, LOCAL, RESULTCID
Constructor and Description |
---|
BasicComponentIdentifier()
Create a new component identifier.
|
BasicComponentIdentifier(IComponentIdentifier cid)
Copy a component identifier.
|
BasicComponentIdentifier(java.lang.String name)
Create a new component identifier with a global name and given addresses.
|
BasicComponentIdentifier(java.lang.String name,
IComponentIdentifier parent)
Create component identifier.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Clone this component identifier.
|
boolean |
equals(java.lang.Object obj)
Test if two component identifiers are equal.
|
java.lang.String |
getLocalName()
Get the local component name.
|
java.lang.String |
getName()
Get the component name.
|
IComponentIdentifier |
getParent()
Get the parent identifier.
|
java.lang.String |
getPlatformName()
Get the platform name.
|
java.lang.String |
getPlatformPrefix()
Get the platform name without the suffix for name uniqueness.
|
static java.lang.String |
getPlatformPrefix(java.lang.String name)
Get the stripped platform name.
|
IComponentIdentifier |
getRoot()
Get the root identifier.
|
int |
hashCode()
The hash code of the object.
|
void |
setName(java.lang.String name)
Set the component name.
|
java.lang.String |
toString()
Return a string representation.
|
public BasicComponentIdentifier()
public BasicComponentIdentifier(java.lang.String name)
name
- A global name (e.g. "cms@lars").addresses
- A list of transport addresses.public BasicComponentIdentifier(java.lang.String name, IComponentIdentifier parent)
name
- The local name.parent
- The parent.addresses
- The addresses.public BasicComponentIdentifier(IComponentIdentifier cid)
cid
- The id to copy from.public java.lang.String getName()
getName
in interface IComponentIdentifier
public void setName(java.lang.String name)
name
- The component name.public IComponentIdentifier getParent()
getParent
in interface IComponentIdentifier
public IComponentIdentifier getRoot()
getRoot
in interface IComponentIdentifier
public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String getLocalName()
IComponentIdentifier
getLocalName
in interface IComponentIdentifier
public java.lang.String getPlatformName()
getPlatformName
in interface IComponentIdentifier
public java.lang.String getPlatformPrefix()
getPlatformPrefix
in interface IComponentIdentifier
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public static java.lang.String getPlatformPrefix(java.lang.String name)
name
- The platform name.