Package org.ldaptive.control
Class SessionTrackingControl
java.lang.Object
org.ldaptive.control.AbstractControl
org.ldaptive.control.AbstractResponseControl
org.ldaptive.control.SessionTrackingControl
- All Implemented Interfaces:
Control,RequestControl,ResponseControl,Freezable
Request/response control for session tracking. See https://tools.ietf.org/html/draft-wahl-ldap-session-03.
Control is defined as:
LDAPString ::= OCTET STRING -- UTF-8 encoded
LDAPOID ::= OCTET STRING -- Constrained to numericoid
SessionIdentifierControlValue ::= SEQUENCE {
sessionSourceIp LDAPString,
sessionSourceName LDAPString,
formatOID LDAPOID,
sessionTrackingIdentifier LDAPString
}
Note that criticality must be either false or absent.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classParse handler implementation for the format oid.private static classParse handler implementation for the source ip.private static classParse handler implementation for the source name.private static classParse handler implementation for the tracking identifier. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringFormat OID.private static final inthash code seed.static final StringOID of this control.static final StringOID for the Acct-Multi-Session-Id RADIUS attribute format.static final StringOID for the Acct-Session-Id RADIUS attribute format.private StringSession source ip.private StringSession source name.private StringSession tracking identifier.static final StringOID for the SASL authorization identity string format.Fields inherited from class org.ldaptive.control.AbstractControl
logger -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.SessionTrackingControl(boolean critical) Creates a new session tracking control.SessionTrackingControl(String sourceIP, String sourceName, String oid, String trackingIdentifier) Creates a new session tracking control.SessionTrackingControl(String sourceIP, String sourceName, String oid, String trackingIdentifier, boolean critical) Creates a new session tracking control. -
Method Summary
Modifier and TypeMethodDescriptionvoidInitializes this response control with the supplied BER encoded data.byte[]encode()Provides the BER encoding of this control.booleanReturns the format OID.Returns the session source ip.Returns the session source name.Returns the session tracking identifier.inthashCode()Returns the hash code for this object.booleanhasValue()Returns whether the control has a value associated with it.voidSets the format OID.voidSets the session source ip.voidSets the session source name.voidSets the session tracking identifier.toString()Methods inherited from class org.ldaptive.control.AbstractResponseControl
assertMutable, freeze, freezeAndAssertMutable, isFrozenMethods inherited from class org.ldaptive.control.AbstractControl
getCriticality, getOIDMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.ldaptive.control.Control
getCriticality, getOID
-
Field Details
-
OID
OID of this control.- See Also:
-
RADIUS_ACCT_OID
OID for the Acct-Session-Id RADIUS attribute format.- See Also:
-
RADIUS_ACCT_MULTI_OID
OID for the Acct-Multi-Session-Id RADIUS attribute format.- See Also:
-
USERNAME_ACCT_OID
OID for the SASL authorization identity string format.- See Also:
-
HASH_CODE_SEED
private static final int HASH_CODE_SEEDhash code seed.- See Also:
-
sessionSourceIp
Session source ip. -
sessionSourceName
Session source name. -
formatOID
Format OID. -
sessionTrackingIdentifier
Session tracking identifier.
-
-
Constructor Details
-
SessionTrackingControl
public SessionTrackingControl()Default constructor. -
SessionTrackingControl
public SessionTrackingControl(boolean critical) Creates a new session tracking control.- Parameters:
critical- whether this control is critical
-
SessionTrackingControl
public SessionTrackingControl(String sourceIP, String sourceName, String oid, String trackingIdentifier) Creates a new session tracking control.- Parameters:
sourceIP- session source ipsourceName- session source nameoid- format OIDtrackingIdentifier- session tracking identifier
-
SessionTrackingControl
public SessionTrackingControl(String sourceIP, String sourceName, String oid, String trackingIdentifier, boolean critical) Creates a new session tracking control.- Parameters:
sourceIP- session source ipsourceName- session source nameoid- format OIDtrackingIdentifier- session tracking identifiercritical- whether this control is critical
-
-
Method Details
-
hasValue
public boolean hasValue()Description copied from interface:RequestControlReturns whether the control has a value associated with it.- Specified by:
hasValuein interfaceRequestControl- Returns:
- whether the control has a value
-
getSessionSourceIp
Returns the session source ip.- Returns:
- session source ip
-
setSessionSourceIp
Sets the session source ip.- Parameters:
s- session source ip
-
getSessionSourceName
Returns the session source name.- Returns:
- session source name
-
setSessionSourceName
Sets the session source name.- Parameters:
s- session source name
-
getFormatOID
Returns the format OID.- Returns:
- format OID
-
setFormatOID
Sets the format OID.- Parameters:
s- format OID
-
getSessionTrackingIdentifier
Returns the session tracking identifier.- Returns:
- session tracking identifier
-
setSessionTrackingIdentifier
Sets the session tracking identifier.- Parameters:
s- session tracking identifier
-
equals
- Overrides:
equalsin classAbstractControl
-
hashCode
public int hashCode()Description copied from class:AbstractControlReturns the hash code for this object.- Specified by:
hashCodein classAbstractControl- Returns:
- hash code
-
toString
- Overrides:
toStringin classAbstractControl
-
encode
public byte[] encode()Description copied from interface:RequestControlProvides the BER encoding of this control.- Specified by:
encodein interfaceRequestControl- Returns:
- BER encoded request control
-
decode
Description copied from interface:ResponseControlInitializes this response control with the supplied BER encoded data.- Specified by:
decodein interfaceResponseControl- Parameters:
encoded- BER encoded response control
-