org.apache.sshd.common
Class Session.AttributeKey<T>
java.lang.Object
org.apache.sshd.common.Session.AttributeKey<T>
- Enclosing interface:
- Session
public static class Session.AttributeKey<T>
- extends java.lang.Object
Type safe key for storage within the user attributes of AbstractSession.
Typically it is used as a static variable that is shared between the producer
and the consumer. To further restrict access the setting or getting it from
the Session you can add static get and set methods, e.g:
private static final AttributeKey MY_KEY = new AttributeKey();
public static MyValue getMyValue(Session s) {
return s.getAttribute(MY_KEY);
}
private void setMyValue(Session s, MyValue value) {
s.setAttribute(MY_KEY, value);
}
- Author:
- Apache MINA SSHD Project
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Session.AttributeKey
public Session.AttributeKey()
Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.