public final class LDAPClientConnection2 extends ClientConnection implements TLSCapableConnection, com.forgerock.reactive.ReactiveHandler<QueueingStrategy,org.forgerock.opendj.ldap.spi.LdapMessages.LdapRequestEnvelope,com.forgerock.reactive.Stream<org.forgerock.opendj.ldap.responses.Response>>
authenticationInfo, bindInProgress, saslBindInProgress, startTLSInProgress| Modifier and Type | Method and Description |
|---|---|
void |
cancelAllOperations(CancelRequest cancelRequest)
Attempts to cancel all operations in progress on this connection.
|
void |
cancelAllOperationsExcept(CancelRequest cancelRequest,
int messageID)
Attempts to cancel all operations in progress on this connection except the operation with the specified message
ID.
|
CancelResult |
cancelOperation(int messageID,
CancelRequest cancelRequest)
Attempts to cancel the specified operation.
|
void |
disconnect(DisconnectReason disconnectReason,
boolean sendNotification,
org.forgerock.i18n.LocalizableMessage message)
Closes the connection to the client, optionally sending it a message indicating the reason for the closure.
|
void |
enableSASL(SaslServer saslServer)
Installs the SASL security layer on the underlying connection.
|
String |
getClientAddress()
Retrieves a string representation of the address of the client.
|
Certificate[] |
getClientCertificateChain()
Return the certificate chain array associated with a connection.
|
int |
getClientPort()
Retrieves the port number for this connection on the client system.
|
ConnectionHandler<?> |
getConnectionHandler()
Retrieves the connection handler that accepted this client connection.
|
long |
getConnectionID()
Retrieves the connection ID assigned to this connection.
|
long |
getIdleTime()
Retrieves the length of time in milliseconds that this client connection has been idle.
|
InetAddress |
getLocalAddress()
Retrieves the
java.net.InetAddress for the Directory Server system to which the client has
established the connection. |
long |
getMaxBlockedWriteTimeLimit()
Retrieves the maximum length of time in milliseconds that
attempts to write data to the client should be allowed to block.
|
String |
getMonitorSummary()
Retrieves a one-line summary of this client connection in a form
that is suitable for including in the monitor entry for the
associated connection handler.
|
long |
getNumberOfOperations()
Returns the total number of operations initiated on this connection.
|
Operation |
getOperationInProgress(int messageID)
Retrieves the operation in progress with the specified message ID.
|
Collection<Operation> |
getOperationsInProgress()
Retrieves the set of operations in progress for this client connection.
|
String |
getProtocol()
Retrieves the protocol that the client is using to communicate with the Directory Server.
|
InetAddress |
getRemoteAddress()
Retrieves the
java.net.InetAddress associated with the remote client system. |
String |
getServerAddress()
Retrieves a string representation of the address on the server to which the client connected.
|
int |
getServerPort()
Retrieves the port number for this connection on the server system.
|
SocketChannel |
getSocketChannel()
Retrieves the socket channel that can be used to communicate with the client.
|
int |
getSSF()
Return the Security Strength Factor of a client connection.
|
Selector |
getWriteSelector()
Retrieves a
Selector that may be used to ensure that
write operations complete in a timely manner, or terminate the
connection in the event that they fail to do so. |
com.forgerock.reactive.Stream<org.forgerock.opendj.ldap.responses.Response> |
handle(QueueingStrategy queueingStrategy,
org.forgerock.opendj.ldap.spi.LdapMessages.LdapRequestEnvelope message)
Processes the provided LDAP message read from the client and takes whatever action is appropriate.
|
boolean |
isConnectionValid()
Returns whether the Directory Server believes this connection to be valid
and available for communication.
|
boolean |
isSecure()
Indicates whether this client connection is currently using a secure mechanism to communicate with the server.
|
boolean |
prepareTLS(org.forgerock.i18n.LocalizableMessageBuilder unavailableReason)
Prepares this connection for using TLS and returns whether TLS protection
is actually available for the underlying client connection.
|
boolean |
removeOperationInProgress(int messageID)
Removes the provided operation from the set of operations in progress for this client connection.
|
protected boolean |
sendIntermediateResponseMessage(IntermediateResponse intermediateResponse)
Sends the provided intermediate response message to the client.
|
void |
sendResponse(Operation operation)
Sends a response to the client based on the information in the provided operation.
|
void |
sendSearchEntry(SearchOperation searchOperation,
SearchResultEntry searchEntry)
Sends the provided search result entry to the client.
|
boolean |
sendSearchReference(SearchOperation searchOperation,
SearchResultReference searchReference)
Sends the provided search result reference to the client.
|
void |
toString(StringBuilder buffer)
Appends a string representation of this client connection to the provided buffer.
|
deregisterPersistentSearch, finalizeConnectionInternal, finishBind, finishSaslBind, finishStartTLS, getAuthenticationInfo, getCertificateAlias, getChannel, getClientHostPort, getConnectTime, getConnectTimeString, getGroups, getIdleTimeLimit, getKeyManagerProviderDN, getLookthroughLimit, getPersistentSearches, getSASLAuthStateInfo, getServerHostPort, getSizeLimit, getTimeLimit, getTrustManagerProviderDN, hasAllPrivileges, hasPrivilege, hasPrivilege, isInnerConnection, isMemberOf, mustChangePassword, registerPersistentSearch, sendIntermediateResponse, setAuthenticationInfo, setIdleTimeLimit, setLookthroughLimit, setMustChangePassword, setSASLAuthStateInfo, setSizeLimit, setTimeLimit, setUnauthenticated, toString, updateAuthenticationInfo, updatePrivilegespublic long getConnectionID()
getConnectionID in class ClientConnectionpublic ConnectionHandler<?> getConnectionHandler()
getConnectionHandler in class ClientConnectionpublic SocketChannel getSocketChannel()
getSocketChannel in class ClientConnectionpublic String getProtocol()
getProtocol in class ClientConnectionpublic String getClientAddress()
getClientAddress in class ClientConnectionpublic int getClientPort()
getClientPort in class ClientConnectionpublic String getServerAddress()
getServerAddress in class ClientConnectionpublic int getServerPort()
getServerPort in class ClientConnectionpublic InetAddress getRemoteAddress()
java.net.InetAddress associated with the remote client system.getRemoteAddress in class ClientConnectionjava.net.InetAddress associated with the remote client system. It may be
null if the client is not connected over an IP-based connection.public InetAddress getLocalAddress()
java.net.InetAddress for the Directory Server system to which the client has
established the connection.getLocalAddress in class ClientConnectionjava.net.InetAddress for the Directory Server system to which the client has established
the connection. It may be null if the client is not connected over an IP-based connection.public boolean isConnectionValid()
ClientConnectionisConnectionValid in class ClientConnectionpublic boolean isSecure()
false to true if the client uses the StartTLS extended operation).isSecure in class ClientConnectiontrue if the client connection is currently using a secure mechanism to communicate with the
server, or false if not.public void sendResponse(Operation operation)
sendResponse in class ClientConnectionoperation - The operation for which to send the response.public void sendSearchEntry(SearchOperation searchOperation, SearchResultEntry searchEntry)
sendSearchEntry in class ClientConnectionsearchOperation - The search operation with which the entry is associatedsearchEntry - The search result entry to be sent to the clientpublic boolean sendSearchReference(SearchOperation searchOperation, SearchResultReference searchReference)
sendSearchReference in class ClientConnectionsearchOperation - The search operation with which the reference is associated.searchReference - The search result reference to be sent to the client.true if the client is able to accept referrals, or false if the client cannot
handle referrals and no more attempts should be made to send them for the associated search operation.protected boolean sendIntermediateResponseMessage(IntermediateResponse intermediateResponse)
sendIntermediateResponseMessage in class ClientConnectionintermediateResponse - The intermediate response message to be sent.true if processing on the associated operation should continue, or false if
not.public void disconnect(DisconnectReason disconnectReason, boolean sendNotification, org.forgerock.i18n.LocalizableMessage message)
disconnect in class ClientConnectiondisconnectReason - The disconnect reason that provides the generic cause for the disconnect.sendNotification - Indicates whether to try to provide notification to the client that the connection will be closed.message - The message to include in the disconnect notification response. It may be null if no
message is to be sent.public Collection<Operation> getOperationsInProgress()
getOperationsInProgress in class ClientConnectionpublic Operation getOperationInProgress(int messageID)
getOperationInProgress in class ClientConnectionmessageID - The message ID for the operation to retrieve.null if no such operation could
be found.public boolean removeOperationInProgress(int messageID)
removeOperationInProgress in class ClientConnectionmessageID - The message ID of the operation to remove from the set of operations in progress.true if the operation was found and removed from the set of operations in progress, or
false if not.public CancelResult cancelOperation(int messageID, CancelRequest cancelRequest)
cancelOperation in class ClientConnectionmessageID - The message ID of the operation to cancel.cancelRequest - An object providing additional information about how the cancel should be processed.public void cancelAllOperations(CancelRequest cancelRequest)
cancelAllOperations in class ClientConnectioncancelRequest - An object providing additional information about how the cancel should be processed.public void cancelAllOperationsExcept(CancelRequest cancelRequest, int messageID)
cancelAllOperationsExcept in class ClientConnectioncancelRequest - An object providing additional information about how the cancel should be processed.messageID - The message ID of the operation that should not be canceled.public Selector getWriteSelector()
ClientConnectionSelector that may be used to ensure that
write operations complete in a timely manner, or terminate the
connection in the event that they fail to do so. This is an
optional method for client connections, and the default
implementation returns null to indicate that the maximum
blocked write time limit is not supported for this connection.
Subclasses that do wish to support this functionality should
return a valid Selector object.getWriteSelector in class ClientConnectionSelector that may be used to ensure that
write operations complete in a timely manner, or
null if this client connection does not support
maximum blocked write time limit functionality.public long getMaxBlockedWriteTimeLimit()
ClientConnectiongetMaxBlockedWriteTimeLimit in class ClientConnectionpublic long getNumberOfOperations()
getNumberOfOperations in class ClientConnectionpublic com.forgerock.reactive.Stream<org.forgerock.opendj.ldap.responses.Response> handle(QueueingStrategy queueingStrategy, org.forgerock.opendj.ldap.spi.LdapMessages.LdapRequestEnvelope message)
handle in interface com.forgerock.reactive.ReactiveHandler<QueueingStrategy,org.forgerock.opendj.ldap.spi.LdapMessages.LdapRequestEnvelope,com.forgerock.reactive.Stream<org.forgerock.opendj.ldap.responses.Response>>queueingStrategy - The QueueingStrategy to use for operationmessage - The LDAP message to process.true if the appropriate action was taken for the request, or false if there was
a fatal error and the client has been disconnected as a result, or if the client unbound from the server.public String getMonitorSummary()
ClientConnectiongetMonitorSummary in class ClientConnectionpublic void toString(StringBuilder buffer)
toString in class ClientConnectionbuffer - The buffer to which the information should be appended.public boolean prepareTLS(org.forgerock.i18n.LocalizableMessageBuilder unavailableReason)
TLSCapableConnectionprepareTLS in interface TLSCapableConnectionunavailableReason - The buffer used to hold the reason that TLS is
not available on the underlying client
connection.true if TLS is available on the underlying client
connection, or false if it is not.public void enableSASL(SaslServer saslServer)
saslServer - The SaslServer which should be used to secure the conneciton.public long getIdleTime()
getIdleTime in class ClientConnectionpublic Certificate[] getClientCertificateChain()
public int getSSF()
ClientConnectiongetSSF in class ClientConnectionCopyright © 2010-2020 Wren Security. All Rights Reserved.