Package org.apache.mina.core.session
Class AttributeKey
- java.lang.Object
-
- org.apache.mina.core.session.AttributeKey
-
- All Implemented Interfaces:
java.io.Serializable
public final class AttributeKey extends java.lang.Object implements java.io.SerializableCreates a Key from a class name and an attribute name. The resulting Key will be stored in the session Map.
For instance, we can create a 'processor' AttributeKey this way :private static final AttributeKey PROCESSOR = new AttributeKey( SimpleIoProcessorPool.class, "processor");This will create the SimpleIoProcessorPool.processor@7DE45C99 key which will be stored in the session map.
Such an attributeKey is mainly useful for debug purposes.- Author:
- Apache MINA Project
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AttributeKey(java.lang.Class<?> source, java.lang.String name)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)inthashCode()java.lang.StringtoString()The String representation of this object.
-
-
-
Constructor Detail
-
AttributeKey
public AttributeKey(java.lang.Class<?> source, java.lang.String name)Creates a new instance. It's built from :- the class' name
- the attribute's name
- this attribute hashCode
- Parameters:
source- The class this AttributeKey will be attached toname- The Attribute name
-
-
Method Detail
-
toString
public java.lang.String toString()
The String representation of this object.- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-