org.apache.mina.core.session

## Class AttributeKey

- java.lang.Object
- - org.apache.mina.core.session.AttributeKey

- All Implemented Interfaces:
    Serializable

      public final class AttributeKey
      extends Object
      implements Serializable

  Creates 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 and Description
    `AttributeKey(Class<?> source, String name)` Creates a new instance.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `int` | `hashCode()`
    `String` | `toString()` The String representation of this object.

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### AttributeKey

          public AttributeKey(Class<?> source,
                      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 to
        `name` - The Attribute name

  - ### Method Detail

    - #### toString

          public String toString()

      The String representation of this object.
      Overrides:
        `toString` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

Copyright © 2004-2012 Apache MINA Project. All Rights Reserved.