Package org.jcsp.net.cns
Class NameAccessLevel
- java.lang.Object
-
- org.jcsp.net.cns.NameAccessLevel
-
- All Implemented Interfaces:
java.io.Serializable
public final class NameAccessLevel extends java.lang.Object implements java.io.SerializableThis class allows name spaces to be identified aroundAbstractIDobjects (currently includingApplicationID,NodeID,DomainIDandGlobalID). AnAbstractIDobject can have a single parentAbstractIDobject. This allows a tree-like hierarchy to be formed which in turn allows a name space hierarchy.For example, two
ApplicationIDobjects, A and B, may each have a parentNodeIDZ. The namespaces created around A and B will each be a superset of the namespace of Z. Channels registered in Z's namespace can be resolved in either A's or B's namespace. A channel registered in A's namespace may neither be resolved in Z's namespace nor B's.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private AbstractIDabstractIDstatic NameAccessLevelGLOBAL_ACCESS_LEVELTheNameAccessLevelfor the global namespace.
-
Constructor Summary
Constructors Constructor Description NameAccessLevel(AbstractID abstractID)Constructor which takes anAbstractIDto use for identifying the namespace.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)Compares an object with this object.(package private) AbstractIDgetLevelAbstractID()Accessor for the underlyingAbstractIDobject.inthashCode()Returns a hash code for this object obeying the standard rules for a hash code.java.lang.StringtoString()Returns a string representation of this object.
-
-
-
Field Detail
-
abstractID
private final AbstractID abstractID
-
GLOBAL_ACCESS_LEVEL
public static final NameAccessLevel GLOBAL_ACCESS_LEVEL
TheNameAccessLevelfor the global namespace.
-
-
Constructor Detail
-
NameAccessLevel
public NameAccessLevel(AbstractID abstractID)
Constructor which takes an
AbstractIDto use for identifying the namespace.
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object o)
Compares an object with this object.- Overrides:
equalsin classjava.lang.Object- Returns:
tureiff the other object is aNameAccessLevelobject which has an equal underlyingAbstractID.- See Also:
AbstractID
-
hashCode
public int hashCode()
Returns a hash code for this object obeying the standard rules for a hash code.- Overrides:
hashCodein classjava.lang.Object- See Also:
Object.hashCode()
-
toString
public java.lang.String toString()
Returns a string representation of this object.- Overrides:
toStringin classjava.lang.Object- Returns:
- a human readable string.
-
getLevelAbstractID
AbstractID getLevelAbstractID()
Accessor for the underlyingAbstractIDobject.- Returns:
- the underlying
AbstractID.
-
-