Package com.isode.dsapi
Enum DirectorySession.ConnectionState
- java.lang.Object
-
- java.lang.Enum<DirectorySession.ConnectionState>
-
- com.isode.dsapi.DirectorySession.ConnectionState
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<DirectorySession.ConnectionState>
- Enclosing class:
- DirectorySession
public static enum DirectorySession.ConnectionState extends java.lang.Enum<DirectorySession.ConnectionState>
Used to report the state of a session: whether and how it is bound. Values here represent the session's state following the most recent directory operation, and are updated whenever an operation is performed.Note that if a network connection is lost, then the session state will not become
CONNECTION_LOST
until the next directory operation is attempted and the problem detected.- Since:
- 14.4
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CONNECTION_ANONYMOUS
A DirectorySession is currently bound with no authentication.CONNECTION_LOST
The library has detected that a DirectorySession which was bound has lost its connection.CONNECTION_SASL
A DirectorySession is currently bound using SASL authentication.CONNECTION_SIMPLE
A DirectorySession is currently bound using simple authentication.CONNECTION_STATE_UNKNOWN
The session state is unknown.CONNECTION_STRONG
A DirectorySession is currently bound using strong authentication.NOT_YET_CONNECTED
A DirectorySession object exists but no bind operation has yet been attempted.UNBOUND
A DirectorySession object which was previously bound has been unbound by the user a by callingDirectorySession.unbind()
.VERIFICATION_FAILED
A connection was attempted over a secured connection, but the certificate presented by the server could not be verified, and so the connection was abandoned.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DirectorySession.ConnectionState
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static DirectorySession.ConnectionState[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NOT_YET_CONNECTED
public static final DirectorySession.ConnectionState NOT_YET_CONNECTED
A DirectorySession object exists but no bind operation has yet been attempted.
-
CONNECTION_LOST
public static final DirectorySession.ConnectionState CONNECTION_LOST
The library has detected that a DirectorySession which was bound has lost its connection. This typically happens in the case of a network error, or if the directory server has closed the connection. Further operations on this session (apart fromunbind()
) will probably result inNotBoundException
being thrown.
-
UNBOUND
public static final DirectorySession.ConnectionState UNBOUND
A DirectorySession object which was previously bound has been unbound by the user a by callingDirectorySession.unbind()
.
-
VERIFICATION_FAILED
public static final DirectorySession.ConnectionState VERIFICATION_FAILED
A connection was attempted over a secured connection, but the certificate presented by the server could not be verified, and so the connection was abandoned. An application wishing to override this behaviour should useCommonArgs.setDisableVerification(boolean)
to prevent verification, and may useDirectorySession.getSessionCertificates()
to obtain the server's certificates so that it can perform its own verification.
-
CONNECTION_ANONYMOUS
public static final DirectorySession.ConnectionState CONNECTION_ANONYMOUS
A DirectorySession is currently bound with no authentication.
-
CONNECTION_SIMPLE
public static final DirectorySession.ConnectionState CONNECTION_SIMPLE
A DirectorySession is currently bound using simple authentication.
-
CONNECTION_STRONG
public static final DirectorySession.ConnectionState CONNECTION_STRONG
A DirectorySession is currently bound using strong authentication.
-
CONNECTION_SASL
public static final DirectorySession.ConnectionState CONNECTION_SASL
A DirectorySession is currently bound using SASL authentication.
-
CONNECTION_STATE_UNKNOWN
public static final DirectorySession.ConnectionState CONNECTION_STATE_UNKNOWN
The session state is unknown.
-
-
Method Detail
-
values
public static DirectorySession.ConnectionState[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DirectorySession.ConnectionState c : DirectorySession.ConnectionState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DirectorySession.ConnectionState valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-