Class InternalClientConnection
- java.lang.Object
-
- org.opends.server.api.ClientConnection
-
- org.opends.server.protocols.internal.InternalClientConnection
-
@PublicAPI(stability=UNCOMMITTED, mayInstantiate=true, mayExtend=false, mayInvoke=true) public final class InternalClientConnection extends ClientConnection
This class defines a pseudo-connection object that can be used for performing internal operations.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opends.server.api.ClientConnection
ClientConnection.Transaction
-
-
Field Summary
Fields Modifier and Type Field Description static StringPROTOCOL_VERSIONThe protocol version string that will be used for internal bind operations.-
Fields inherited from class org.opends.server.api.ClientConnection
authenticationInfo, bindInProgress, saslBindInProgress, startTLSInProgress
-
-
Constructor Summary
Constructors Constructor Description InternalClientConnection(DN userDN)Creates a new internal client connection that will be authenticated as the specified user.InternalClientConnection(AuthenticationInfo authInfo)Creates a new internal client connection that will be authenticated as the specified user.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancelAllOperations(CancelRequest cancelRequest)Attempts to cancel all operations in progress on this connection.voidcancelAllOperationsExcept(CancelRequest cancelRequest, int messageID)Attempts to cancel all operations in progress on this connection except the operation with the specified message ID.CancelResultcancelOperation(int messageID, CancelRequest cancelRequest)Attempts to cancel the specified operation.voiddisconnect(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.StringgetClientAddress()Retrieves a string representation of the address of the client.intgetClientPort()Retrieves the port number for this connection on the client system.ConnectionHandler<?>getConnectionHandler()Retrieves the connection handler that accepted this client connection.longgetConnectionID()Retrieves the unique identifier that has been assigned to this connection.InetAddressgetLocalAddress()Retrieves thejava.net.InetAddressfor the Directory Server system to which the client has established the connection.StringgetMonitorSummary()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.longgetNumberOfOperations()To be implemented.OperationgetOperationInProgress(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.StringgetProtocol()Retrieves the protocol that the client is using to communicate with the Directory Server.InetAddressgetRemoteAddress()Retrieves thejava.net.InetAddressassociated with the remote client system.static InternalClientConnectiongetRootConnection()Retrieves a shared internal client connection that is authenticated as a root user.StringgetServerAddress()Retrieves a string representation of the address on the server to which the client connected.intgetServerPort()Retrieves the port number for this connection on the server system if available.intgetSSF()Return the Security Strength Factor of a client connection.booleanisConnectionValid()Returns whether the Directory Server believes this connection to be valid and available for communication.booleanisSecure()Indicates whether this client connection is currently using a secure mechanism to communicate with the server.static intnextMessageID()Retrieves the message ID that should be used for the next internal operation.static longnextOperationID()Retrieves the operation ID that should be used for the next internal operation.AddOperationprocessAdd(String rawEntryDN, List<RawAttribute> rawAttributes)Processes an internal add operation with the provided information.AddOperationprocessAdd(ByteString rawEntryDN, List<RawAttribute> rawAttributes)Processes an internal add operation with the provided information.AddOperationprocessAdd(ByteString rawEntryDN, List<RawAttribute> rawAttributes, List<Control> controls)Processes an internal add operation with the provided information.AddOperationprocessAdd(Entry entry)Processes an internal add operation with the provided information.AddOperationprocessAdd(Entry entry, List<Control> controls)Processes an internal add operation with the provided information.AddOperationprocessAdd(AddChangeRecordEntry addRecord)Processes an internal add operation based on the provided add change record entry.CompareOperationprocessCompare(String rawEntryDN, String attributeType, String assertionValue)Processes an internal compare operation with the provided information.CompareOperationprocessCompare(ByteString rawEntryDN, String attributeType, ByteString assertionValue, List<Control> controls)Processes an internal compare operation with the provided information.DeleteOperationprocessDelete(String rawEntryDN)Processes an internal delete operation with the provided information.DeleteOperationprocessDelete(ByteString rawEntryDN)Processes an internal delete operation with the provided information.DeleteOperationprocessDelete(ByteString rawEntryDN, List<Control> controls)Processes an internal delete operation with the provided information.DeleteOperationprocessDelete(DN entryDN)Processes an internal delete operation with the provided information.DeleteOperationprocessDelete(DN entryDN, List<Control> controls)Processes an internal delete operation with the provided information.DeleteOperationprocessDelete(DeleteChangeRecordEntry deleteRecord)Processes an internal delete operation with the provided information.ExtendedOperationprocessExtendedOperation(String requestOID, ByteString requestValue)Processes an internal extended operation with the provided information.ExtendedOperationprocessExtendedOperation(String requestOID, ByteString requestValue, List<Control> controls)Processes an internal extended operation with the provided information.ModifyOperationprocessModify(ByteString rawEntryDN, List<RawModification> rawModifications)Processes an internal modify operation with the provided information.ModifyOperationprocessModify(DN entryDN, List<Modification> modifications)Processes an internal modify operation with the provided information.ModifyOperationprocessModify(DN entryDN, List<Modification> modifications, List<Control> controls)Processes an internal modify operation with the provided information.ModifyOperationprocessModify(ModifyRequest modifyRequest)Processes an internal modify operation with the provided information.ModifyOperationprocessModify(ModifyChangeRecordEntry modifyRecord)Processes an internal modify operation with the provided information.ModifyDNOperationprocessModifyDN(String rawEntryDN, String rawNewRDN, boolean deleteOldRDN, String rawNewSuperior)Processes an internal modify DN operation with the provided information.ModifyDNOperationprocessModifyDN(ByteString rawEntryDN, ByteString rawNewRDN, boolean deleteOldRDN, ByteString rawNewSuperior, List<Control> controls)Processes an internal modify DN operation with the provided information.ModifyDNOperationprocessModifyDN(DN entryDN, RDN newRDN, boolean deleteOldRDN)Processes an internal modify DN operation with the provided information.ModifyDNOperationprocessModifyDN(DN entryDN, RDN newRDN, boolean deleteOldRDN, DN newSuperior)Processes an internal modify DN operation with the provided information.ModifyDNOperationprocessModifyDN(DN entryDN, RDN newRDN, boolean deleteOldRDN, DN newSuperior, List<Control> controls)Processes an internal modify DN operation with the provided information.ModifyDNOperationprocessModifyDN(ModifyDNRequest modifyDNRequest)Processes an internal modify DN operation with the provided information.ModifyDNOperationprocessModifyDN(ModifyDNChangeRecordEntry modifyDNRecord)Processes an internal modify DN operation with the provided information.BindOperationprocessSASLBind(ByteString rawBindDN, String saslMechanism, ByteString saslCredentials)Processes an internal bind operation with the provided information.BindOperationprocessSASLBind(ByteString rawBindDN, String saslMechanism, ByteString saslCredentials, List<Control> controls)Processes an internal bind operation with the provided information.BindOperationprocessSASLBind(DN bindDN, String saslMechanism, ByteString saslCredentials)Processes an internal bind operation with the provided information.BindOperationprocessSASLBind(DN bindDN, String saslMechanism, ByteString saslCredentials, List<Control> controls)Processes an internal bind operation with the provided information.InternalSearchOperationprocessSearch(SearchRequest request)Processes an internal search operation with the provided information.InternalSearchOperationprocessSearch(SearchRequest request, InternalSearchListener searchListener)Processes an internal search operation with the provided information.BindOperationprocessSimpleBind(String rawBindDN, String password)Processes an internal bind operation with the provided information.BindOperationprocessSimpleBind(ByteString rawBindDN, ByteString password)Processes an internal bind operation with the provided information.BindOperationprocessSimpleBind(ByteString rawBindDN, ByteString password, List<Control> controls)Processes an internal bind operation with the provided information.BindOperationprocessSimpleBind(DN bindDN, ByteString password)Processes an internal bind operation with the provided information.BindOperationprocessSimpleBind(DN bindDN, ByteString password, List<Control> controls)Processes an internal bind operation with the provided information.booleanremoveOperationInProgress(int messageID)Removes the provided operation from the set of operations in progress for this client connection.protected booleansendIntermediateResponseMessage(IntermediateResponse intermediateResponse)Sends the provided intermediate response message to the client.voidsendResponse(Operation operation)Sends a response to the client based on the information in the provided operation.voidsendSearchEntry(SearchOperation searchOperation, SearchResultEntry searchEntry)Sends the provided search result entry to the client.booleansendSearchReference(SearchOperation searchOperation, SearchResultReference searchReference)Sends the provided search result reference to the client.voidsetAuthenticationInfo(AuthenticationInfo authenticationInfo)This method has no effect, as the authentication info for internal client connections is set when the connection is created and cannot be changed after the fact.voidsetIdleTimeLimit(long idleTimeLimit)Specifies the maximum length of time in milliseconds that this client connection will be allowed to remain idle before it should be disconnected.voidsetLookthroughLimit(int lookthroughLimit)Specifies the default maximum number of entries that should be checked for matches during a search.voidsetSizeLimit(int sizeLimit)Specifies the size limit that will be enforced for searches performed using this client connection.voidsetTimeLimit(int timeLimit)Specifies the time limit that will be enforced for searches performed using this client connection.voidsetUnauthenticated()This method has no effect, as the authentication info for internal client connections is set when the connection is created and cannot be changed after the fact.voidtoString(StringBuilder buffer)Appends a string representation of this client connection to the provided buffer.-
Methods inherited from class org.opends.server.api.ClientConnection
deregisterPersistentSearch, finalizeConnectionInternal, finishBind, finishSaslBind, finishStartTLS, getAuthenticationInfo, getCertificateAlias, getChannel, getClientHostPort, getConnectTime, getConnectTimeString, getGroups, getIdleTime, getIdleTimeLimit, getKeyManagerProviderDN, getLookthroughLimit, getMaxBlockedWriteTimeLimit, getPersistentSearches, getSASLAuthStateInfo, getServerHostPort, getSizeLimit, getSocketChannel, getTimeLimit, getTransaction, getTrustManagerProviderDN, getWriteSelector, hasAllPrivileges, hasPersistentSearch, hasPrivilege, hasPrivilege, isInnerConnection, isMemberOf, mustChangePassword, registerPersistentSearch, sendIntermediateResponse, setMustChangePassword, setSASLAuthStateInfo, startTransaction, toString, updateAuthenticationInfo, updatePrivileges
-
-
-
-
Field Detail
-
PROTOCOL_VERSION
public static final String PROTOCOL_VERSION
The protocol version string that will be used for internal bind operations. Since this is modeled after LDAPv3 binds, it will use a version number string of "3".- See Also:
- Constant Field Values
-
-
Constructor Detail
-
InternalClientConnection
public InternalClientConnection(AuthenticationInfo authInfo)
Creates a new internal client connection that will be authenticated as the specified user.- Parameters:
authInfo- The authentication information to use for the connection.
-
InternalClientConnection
public InternalClientConnection(DN userDN) throws DirectoryException
Creates a new internal client connection that will be authenticated as the specified user.- Parameters:
userDN- The DN of the entry to use as the authentication and authorization identity.- Throws:
DirectoryException- If a problem occurs while trying to get the entry for the provided user DN.
-
-
Method Detail
-
getRootConnection
public static InternalClientConnection getRootConnection()
Retrieves a shared internal client connection that is authenticated as a root user.- Returns:
- A shared internal client connection that is authenticated as a root user.
-
nextOperationID
public static long nextOperationID()
Retrieves the operation ID that should be used for the next internal operation.- Returns:
- The operation ID that should be used for the next internal operation.
-
nextMessageID
public static int nextMessageID()
Retrieves the message ID that should be used for the next internal operation.- Returns:
- The message ID that should be used for the next internal operation.
-
getConnectionID
public long getConnectionID()
Retrieves the unique identifier that has been assigned to this connection.- Specified by:
getConnectionIDin classClientConnection- Returns:
- The unique identifier that has been assigned to this connection.
-
getConnectionHandler
@PublicAPI(stability=PRIVATE, mayInstantiate=false, mayExtend=false, mayInvoke=false) public ConnectionHandler<?> getConnectionHandler()
Retrieves the connection handler that accepted this client connection.- Specified by:
getConnectionHandlerin classClientConnection- Returns:
- The connection handler that accepted this client connection.
-
getProtocol
public String getProtocol()
Retrieves the protocol that the client is using to communicate with the Directory Server.- Specified by:
getProtocolin classClientConnection- Returns:
- The protocol that the client is using to communicate with the Directory Server.
-
getClientAddress
public String getClientAddress()
Retrieves a string representation of the address of the client.- Specified by:
getClientAddressin classClientConnection- Returns:
- A string representation of the address of the client.
-
getClientPort
public int getClientPort()
Retrieves the port number for this connection on the client system.- Specified by:
getClientPortin classClientConnection- Returns:
- The port number for this connection on the client system.
-
getServerAddress
public String getServerAddress()
Retrieves a string representation of the address on the server to which the client connected.- Specified by:
getServerAddressin classClientConnection- Returns:
- A string representation of the address on the server to which the client connected.
-
getServerPort
public int getServerPort()
Retrieves the port number for this connection on the server system if available.- Specified by:
getServerPortin classClientConnection- Returns:
- The port number for this connection on the server system or -1 if there is no server port associated with this connection (e.g. internal client).
-
getRemoteAddress
public InetAddress getRemoteAddress()
Retrieves thejava.net.InetAddressassociated with the remote client system.- Specified by:
getRemoteAddressin classClientConnection- Returns:
- The
java.net.InetAddressassociated with the remote client system. It may benullif the client is not connected over an IP-based connection.
-
getLocalAddress
public InetAddress getLocalAddress()
Retrieves thejava.net.InetAddressfor the Directory Server system to which the client has established the connection.- Specified by:
getLocalAddressin classClientConnection- Returns:
- The
java.net.InetAddressfor the Directory Server system to which the client has established the connection. It may benullif the client is not connected over an IP-based connection.
-
setSizeLimit
public void setSizeLimit(int sizeLimit)
Specifies the size limit that will be enforced for searches performed using this client connection. This method does nothing because connection-level size limits will never be enforced for internal client connections.- Overrides:
setSizeLimitin classClientConnection- Parameters:
sizeLimit- The size limit that will be enforced for searches performed using this client connection.
-
setLookthroughLimit
public void setLookthroughLimit(int lookthroughLimit)
Specifies the default maximum number of entries that should be checked for matches during a search. This method does nothing because connection-level lookthrough limits will never be enforced for internal client connections- Overrides:
setLookthroughLimitin classClientConnection- Parameters:
lookthroughLimit- The default maximum number of entries that should be check for matches during a search.
-
setIdleTimeLimit
public void setIdleTimeLimit(long idleTimeLimit)
Specifies the maximum length of time in milliseconds that this client connection will be allowed to remain idle before it should be disconnected. This method does nothing because internal client connections will not be terminated due to an idle time limit.- Overrides:
setIdleTimeLimitin classClientConnection- Parameters:
idleTimeLimit- The maximum length of time in milliseconds that this client connection will be allowed to remain idle before it should be disconnected.
-
setTimeLimit
public void setTimeLimit(int timeLimit)
Specifies the time limit that will be enforced for searches performed using this client connection. This method does nothing because connection-level time limits will never be enforced for internal client connections.- Overrides:
setTimeLimitin classClientConnection- Parameters:
timeLimit- The time limit that will be enforced for searches performed using this client connection.
-
isConnectionValid
public boolean isConnectionValid()
Description copied from class:ClientConnectionReturns whether the Directory Server believes this connection to be valid and available for communication.- Specified by:
isConnectionValidin classClientConnection- Returns:
- true if the connection is valid, false otherwise
-
isSecure
public boolean isSecure()
Indicates whether this client connection is currently using a secure mechanism to communicate with the server. Note that this may change over time based on operations performed by the client or server (e.g., it may go fromfalsetotrueif the client uses the StartTLS extended operation).- Specified by:
isSecurein classClientConnection- Returns:
trueif the client connection is currently using a secure mechanism to communicate with the server, orfalseif not.
-
sendResponse
@PublicAPI(stability=PRIVATE, mayInstantiate=false, mayExtend=false, mayInvoke=false) public void sendResponse(Operation operation)
Sends a response to the client based on the information in the provided operation.- Specified by:
sendResponsein classClientConnection- Parameters:
operation- The operation for which to send the response.
-
setAuthenticationInfo
@PublicAPI(stability=PRIVATE, mayInstantiate=false, mayExtend=false, mayInvoke=false) public void setAuthenticationInfo(AuthenticationInfo authenticationInfo)
This method has no effect, as the authentication info for internal client connections is set when the connection is created and cannot be changed after the fact.- Overrides:
setAuthenticationInfoin classClientConnection- Parameters:
authenticationInfo- Information about the authentication that has been performed for this connection. It should not benull.
-
setUnauthenticated
@PublicAPI(stability=PRIVATE, mayInstantiate=false, mayExtend=false, mayInvoke=false) public void setUnauthenticated()
This method has no effect, as the authentication info for internal client connections is set when the connection is created and cannot be changed after the fact.- Overrides:
setUnauthenticatedin classClientConnection
-
processAdd
public AddOperation processAdd(String rawEntryDN, List<RawAttribute> rawAttributes)
Processes an internal add operation with the provided information.- Parameters:
rawEntryDN- The DN to use for the entry to add.rawAttributes- The set of attributes to include in the entry to add.- Returns:
- A reference to the add operation that was processed and contains information about the result of the processing.
-
processAdd
public AddOperation processAdd(ByteString rawEntryDN, List<RawAttribute> rawAttributes)
Processes an internal add operation with the provided information.- Parameters:
rawEntryDN- The DN to use for the entry to add.rawAttributes- The set of attributes to include in the entry to add.- Returns:
- A reference to the add operation that was processed and contains information about the result of the processing.
-
processAdd
public AddOperation processAdd(ByteString rawEntryDN, List<RawAttribute> rawAttributes, List<Control> controls)
Processes an internal add operation with the provided information.- Parameters:
rawEntryDN- The DN to use for the entry to add.rawAttributes- The set of attributes to include in the entry to add.controls- The set of controls to include in the request.- Returns:
- A reference to the add operation that was processed and contains information about the result of the processing.
-
processAdd
public AddOperation processAdd(Entry entry)
Processes an internal add operation with the provided information.- Parameters:
entry- The entry to be added.- Returns:
- A reference to the add operation that was processed and contains information about the result of the processing.
-
processAdd
public AddOperation processAdd(Entry entry, List<Control> controls)
Processes an internal add operation with the provided information.- Parameters:
entry- The entry to be added.controls- The set of controls to include in the request.- Returns:
- A reference to the add operation that was processed and contains information about the result of the processing.
-
processAdd
public AddOperation processAdd(AddChangeRecordEntry addRecord)
Processes an internal add operation based on the provided add change record entry.- Parameters:
addRecord- The add change record entry to be processed.- Returns:
- A reference to the add operation that was processed and contains information about the result of the processing.
-
processSimpleBind
public BindOperation processSimpleBind(String rawBindDN, String password)
Processes an internal bind operation with the provided information. Note that regardless of whether the bind is successful, the authentication state for this internal connection will not be altered in any way.- Parameters:
rawBindDN- The bind DN for the operation.password- The bind password for the operation.- Returns:
- A reference to the bind operation that was processed and contains information about the result of the processing.
-
processSimpleBind
public BindOperation processSimpleBind(ByteString rawBindDN, ByteString password)
Processes an internal bind operation with the provided information. Note that regardless of whether the bind is successful, the authentication state for this internal connection will not be altered in any way.- Parameters:
rawBindDN- The bind DN for the operation.password- The bind password for the operation.- Returns:
- A reference to the bind operation that was processed and contains information about the result of the processing.
-
processSimpleBind
public BindOperation processSimpleBind(ByteString rawBindDN, ByteString password, List<Control> controls)
Processes an internal bind operation with the provided information. Note that regardless of whether the bind is successful, the authentication state for this internal connection will not be altered in any way.- Parameters:
rawBindDN- The bind DN for the operation.password- The bind password for the operation.controls- The set of controls to include in the request.- Returns:
- A reference to the bind operation that was processed and contains information about the result of the processing.
-
processSimpleBind
public BindOperation processSimpleBind(DN bindDN, ByteString password)
Processes an internal bind operation with the provided information. Note that regardless of whether the bind is successful, the authentication state for this internal connection will not be altered in any way.- Parameters:
bindDN- The bind DN for the operation.password- The bind password for the operation.- Returns:
- A reference to the bind operation that was processed and contains information about the result of the processing.
-
processSimpleBind
public BindOperation processSimpleBind(DN bindDN, ByteString password, List<Control> controls)
Processes an internal bind operation with the provided information. Note that regardless of whether the bind is successful, the authentication state for this internal connection will not be altered in any way.- Parameters:
bindDN- The bind DN for the operation.password- The bind password for the operation.controls- The set of controls to include in the request.- Returns:
- A reference to the bind operation that was processed and contains information about the result of the processing.
-
processSASLBind
public BindOperation processSASLBind(ByteString rawBindDN, String saslMechanism, ByteString saslCredentials)
Processes an internal bind operation with the provided information. Note that regardless of whether the bind is successful, the authentication state for this internal connection will not be altered in any way.- Parameters:
rawBindDN- The bind DN for the operation.saslMechanism- The SASL mechanism for the operation.saslCredentials- The SASL credentials for the operation.- Returns:
- A reference to the bind operation that was processed and contains information about the result of the processing.
-
processSASLBind
public BindOperation processSASLBind(ByteString rawBindDN, String saslMechanism, ByteString saslCredentials, List<Control> controls)
Processes an internal bind operation with the provided information. Note that regardless of whether the bind is successful, the authentication state for this internal connection will not be altered in any way.- Parameters:
rawBindDN- The bind DN for the operation.saslMechanism- The SASL mechanism for the operation.saslCredentials- The SASL credentials for the operation.controls- The set of controls to include in the request.- Returns:
- A reference to the bind operation that was processed and contains information about the result of the processing.
-
processSASLBind
public BindOperation processSASLBind(DN bindDN, String saslMechanism, ByteString saslCredentials)
Processes an internal bind operation with the provided information. Note that regardless of whether the bind is successful, the authentication state for this internal connection will not be altered in any way.- Parameters:
bindDN- The bind DN for the operation.saslMechanism- The SASL mechanism for the operation.saslCredentials- The SASL credentials for the operation.- Returns:
- A reference to the bind operation that was processed and contains information about the result of the processing.
-
processSASLBind
public BindOperation processSASLBind(DN bindDN, String saslMechanism, ByteString saslCredentials, List<Control> controls)
Processes an internal bind operation with the provided information. Note that regardless of whether the bind is successful, the authentication state for this internal connection will not be altered in any way.- Parameters:
bindDN- The bind DN for the operation.saslMechanism- The SASL mechanism for the operation.saslCredentials- The SASL credentials for the operation.controls- The set of controls to include in the request.- Returns:
- A reference to the bind operation that was processed and contains information about the result of the processing.
-
processCompare
public CompareOperation processCompare(String rawEntryDN, String attributeType, String assertionValue)
Processes an internal compare operation with the provided information.- Parameters:
rawEntryDN- The entry DN for the compare operation.attributeType- The attribute type for the compare operation.assertionValue- The assertion value for the compare operation.- Returns:
- A reference to the compare operation that was processed and contains information about the result of the processing.
-
processCompare
public CompareOperation processCompare(ByteString rawEntryDN, String attributeType, ByteString assertionValue, List<Control> controls)
Processes an internal compare operation with the provided information.- Parameters:
rawEntryDN- The entry DN for the compare operation.attributeType- The attribute type for the compare operation.assertionValue- The assertion value for the compare operation.controls- The set of controls to include in the request.- Returns:
- A reference to the compare operation that was processed and contains information about the result of the processing.
-
processDelete
public DeleteOperation processDelete(String rawEntryDN)
Processes an internal delete operation with the provided information.- Parameters:
rawEntryDN- The entry DN for the delete operation.- Returns:
- A reference to the delete operation that was processed and contains information about the result of the processing.
-
processDelete
public DeleteOperation processDelete(ByteString rawEntryDN)
Processes an internal delete operation with the provided information.- Parameters:
rawEntryDN- The entry DN for the delete operation.- Returns:
- A reference to the delete operation that was processed and contains information about the result of the processing.
-
processDelete
public DeleteOperation processDelete(ByteString rawEntryDN, List<Control> controls)
Processes an internal delete operation with the provided information.- Parameters:
rawEntryDN- The entry DN for the delete operation.controls- The set of controls to include in the request.- Returns:
- A reference to the delete operation that was processed and contains information about the result of the processing.
-
processDelete
public DeleteOperation processDelete(DN entryDN)
Processes an internal delete operation with the provided information.- Parameters:
entryDN- The entry DN for the delete operation.- Returns:
- A reference to the delete operation that was processed and contains information about the result of the processing.
-
processDelete
public DeleteOperation processDelete(DN entryDN, List<Control> controls)
Processes an internal delete operation with the provided information.- Parameters:
entryDN- The entry DN for the delete operation.controls- The set of controls to include in the request.- Returns:
- A reference to the delete operation that was processed and contains information about the result of the processing.
-
processDelete
public DeleteOperation processDelete(DeleteChangeRecordEntry deleteRecord)
Processes an internal delete operation with the provided information.- Parameters:
deleteRecord- The delete change record entry to be processed.- Returns:
- A reference to the delete operation that was processed and contains information about the result of the processing.
-
processExtendedOperation
public ExtendedOperation processExtendedOperation(String requestOID, ByteString requestValue)
Processes an internal extended operation with the provided information.- Parameters:
requestOID- The OID for the extended request.requestValue- The encoded value for the extended operation, ornullif there is no value.- Returns:
- A reference to the extended operation that was processed and contains information about the result of the processing.
-
processExtendedOperation
public ExtendedOperation processExtendedOperation(String requestOID, ByteString requestValue, List<Control> controls)
Processes an internal extended operation with the provided information.- Parameters:
requestOID- The OID for the extended request.requestValue- The encoded value for the extended operation, ornullif there is no value.controls- The set of controls to include in the request.- Returns:
- A reference to the extended operation that was processed and contains information about the result of the processing.
-
processModify
public ModifyOperation processModify(ByteString rawEntryDN, List<RawModification> rawModifications)
Processes an internal modify operation with the provided information.- Parameters:
rawEntryDN- The raw entry DN for this modify operation.rawModifications- The set of modifications for this modify operation.- Returns:
- A reference to the modify operation that was processed and contains information about the result of the processing.
-
processModify
public ModifyOperation processModify(DN entryDN, List<Modification> modifications)
Processes an internal modify operation with the provided information.- Parameters:
entryDN- The entry DN for this modify operation.modifications- The set of modifications for this modify operation.- Returns:
- A reference to the modify operation that was processed and contains information about the result of the processing.
-
processModify
public ModifyOperation processModify(DN entryDN, List<Modification> modifications, List<Control> controls)
Processes an internal modify operation with the provided information.- Parameters:
entryDN- The entry DN for this modify operation.modifications- The set of modifications for this modify operation.controls- The set of controls to include in the request.- Returns:
- A reference to the modify operation that was processed and contains information about the result of the processing.
-
processModify
public ModifyOperation processModify(ModifyChangeRecordEntry modifyRecord)
Processes an internal modify operation with the provided information.- Parameters:
modifyRecord- The modify change record entry with information about the changes to perform.- Returns:
- A reference to the modify operation that was processed and contains information about the result of the processing.
-
processModify
public ModifyOperation processModify(ModifyRequest modifyRequest)
Processes an internal modify operation with the provided information.- Parameters:
modifyRequest- The modify request with information about the changes to perform.- Returns:
- A reference to the modify operation that was processed and contains information about the result of the processing.
-
processModifyDN
public ModifyDNOperation processModifyDN(String rawEntryDN, String rawNewRDN, boolean deleteOldRDN, String rawNewSuperior)
Processes an internal modify DN operation with the provided information.- Parameters:
rawEntryDN- The current DN of the entry to rename.rawNewRDN- The new RDN to use for the entry.deleteOldRDN- The flag indicating whether the old RDN value is to be removed from the entry.rawNewSuperior- The new superior for the modify DN operation, ornullif the entry will remain below the same parent.- Returns:
- A reference to the modify DN operation that was processed and contains information about the result of the processing.
-
processModifyDN
public ModifyDNOperation processModifyDN(ByteString rawEntryDN, ByteString rawNewRDN, boolean deleteOldRDN, ByteString rawNewSuperior, List<Control> controls)
Processes an internal modify DN operation with the provided information.- Parameters:
rawEntryDN- The current DN of the entry to rename.rawNewRDN- The new RDN to use for the entry.deleteOldRDN- The flag indicating whether the old RDN value is to be removed from the entry.rawNewSuperior- The new superior for the modify DN operation, ornullif the entry will remain below the same parent.controls- The set of controls to include in the request.- Returns:
- A reference to the modify DN operation that was processed and contains information about the result of the processing.
-
processModifyDN
public ModifyDNOperation processModifyDN(DN entryDN, RDN newRDN, boolean deleteOldRDN)
Processes an internal modify DN operation with the provided information.- Parameters:
entryDN- The current DN of the entry to rename.newRDN- The new RDN to use for the entry.deleteOldRDN- The flag indicating whether the old RDN value is to be removed from the entry.- Returns:
- A reference to the modify DN operation that was processed and contains information about the result of the processing.
-
processModifyDN
public ModifyDNOperation processModifyDN(DN entryDN, RDN newRDN, boolean deleteOldRDN, DN newSuperior)
Processes an internal modify DN operation with the provided information.- Parameters:
entryDN- The current DN of the entry to rename.newRDN- The new RDN to use for the entry.deleteOldRDN- The flag indicating whether the old RDN value is to be removed from the entry.newSuperior- The new superior for the modify DN operation, ornullif the entry will remain below the same parent.- Returns:
- A reference to the modify DN operation that was processed and contains information about the result of the processing.
-
processModifyDN
public ModifyDNOperation processModifyDN(DN entryDN, RDN newRDN, boolean deleteOldRDN, DN newSuperior, List<Control> controls)
Processes an internal modify DN operation with the provided information.- Parameters:
entryDN- The current DN of the entry to rename.newRDN- The new RDN to use for the entry.deleteOldRDN- The flag indicating whether the old RDN value is to be removed from the entry.newSuperior- The new superior for the modify DN operation, ornullif the entry will remain below the same parent.controls- The set of controls to include in the request.- Returns:
- A reference to the modify DN operation that was processed and contains information about the result of the processing.
-
processModifyDN
public ModifyDNOperation processModifyDN(ModifyDNChangeRecordEntry modifyDNRecord)
Processes an internal modify DN operation with the provided information.- Parameters:
modifyDNRecord- The modify DN change record entry with information about the processing to perform.- Returns:
- A reference to the modify DN operation that was processed and contains information about the result of the processing.
-
processModifyDN
public ModifyDNOperation processModifyDN(ModifyDNRequest modifyDNRequest)
Processes an internal modify DN operation with the provided information.- Parameters:
modifyDNRequest- The modify DN requests with information about the processing to perform.- Returns:
- A reference to the modify DN operation that was processed and contains information about the result of the processing.
-
processSearch
public InternalSearchOperation processSearch(SearchRequest request)
Processes an internal search operation with the provided information.- Parameters:
request- The search request.- Returns:
- A reference to the internal search operation that was processed and contains information about the result of the processing.
-
processSearch
public InternalSearchOperation processSearch(SearchRequest request, InternalSearchListener searchListener)
Processes an internal search operation with the provided information.- Parameters:
request- The search request.searchListener- The internal search listener that should be used to handle the matching entries and references.- Returns:
- A reference to the internal search operation that was processed and contains information about the result of the processing.
-
sendSearchEntry
@PublicAPI(stability=PRIVATE, mayInstantiate=false, mayExtend=false, mayInvoke=false) public void sendSearchEntry(SearchOperation searchOperation, SearchResultEntry searchEntry) throws DirectoryException
Sends the provided search result entry to the client.- Specified by:
sendSearchEntryin classClientConnection- Parameters:
searchOperation- The search operation with which the entry is associated.searchEntry- The search result entry to be sent to the client.- Throws:
DirectoryException- If a problem occurs while processing the entry and the search should be terminated.
-
sendSearchReference
@PublicAPI(stability=PRIVATE, mayInstantiate=false, mayExtend=false, mayInvoke=false) public boolean sendSearchReference(SearchOperation searchOperation, SearchResultReference searchReference) throws DirectoryException
Sends the provided search result reference to the client.- Specified by:
sendSearchReferencein classClientConnection- Parameters:
searchOperation- The search operation with which the reference is associated.searchReference- The search result reference to be sent to the client.- Returns:
trueif the client is able to accept referrals, orfalseif the client cannot handle referrals and no more attempts should be made to send them for the associated search operation.- Throws:
DirectoryException- If a problem occurs while processing the entry and the search should be terminated.
-
sendIntermediateResponseMessage
@PublicAPI(stability=PRIVATE, mayInstantiate=false, mayExtend=false, mayInvoke=false) protected boolean sendIntermediateResponseMessage(IntermediateResponse intermediateResponse)
Sends the provided intermediate response message to the client.- Specified by:
sendIntermediateResponseMessagein classClientConnection- Parameters:
intermediateResponse- The intermediate response message to be sent.- Returns:
trueif processing on the associated operation should continue, orfalseif not.
-
disconnect
@PublicAPI(stability=PRIVATE, mayInstantiate=false, mayExtend=false, mayInvoke=false) public 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. Note that the ability to send a notice of disconnection may not be available for all protocols or under all circumstances.- Specified by:
disconnectin classClientConnection- Parameters:
disconnectReason- 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 send to the client. It may benullif no notification is to be sent.
-
getOperationsInProgress
@PublicAPI(stability=PRIVATE, mayInstantiate=false, mayExtend=false, mayInvoke=false) public Collection<Operation> getOperationsInProgress()
Retrieves the set of operations in progress for this client connection. This list must not be altered by any caller.- Specified by:
getOperationsInProgressin classClientConnection- Returns:
- The set of operations in progress for this client connection.
-
getOperationInProgress
@PublicAPI(stability=PRIVATE, mayInstantiate=false, mayExtend=false, mayInvoke=false) public Operation getOperationInProgress(int messageID)
Retrieves the operation in progress with the specified message ID.- Specified by:
getOperationInProgressin classClientConnection- Parameters:
messageID- The message ID of the operation to retrieve.- Returns:
- The operation in progress with the specified message ID,
or
nullif no such operation could be found.
-
removeOperationInProgress
@PublicAPI(stability=PRIVATE, mayInstantiate=false, mayExtend=false, mayInvoke=false) public boolean removeOperationInProgress(int messageID)
Removes the provided operation from the set of operations in progress for this client connection. Note that this does not make any attempt to cancel any processing that may already be in progress for the operation.- Specified by:
removeOperationInProgressin classClientConnection- Parameters:
messageID- The message ID of the operation to remove from the set of operations in progress.- Returns:
trueif the operation was found and removed from the set of operations in progress, orfalseif not.
-
cancelOperation
@PublicAPI(stability=PRIVATE, mayInstantiate=false, mayExtend=false, mayInvoke=false) public CancelResult cancelOperation(int messageID, CancelRequest cancelRequest)
Attempts to cancel the specified operation.- Specified by:
cancelOperationin classClientConnection- Parameters:
messageID- The message ID of the operation to cancel.cancelRequest- An object providing additional information about how the cancel should be processed.- Returns:
- A cancel result that either indicates that the cancel was successful or provides a reason that it was not.
-
cancelAllOperations
@PublicAPI(stability=PRIVATE, mayInstantiate=false, mayExtend=false, mayInvoke=false) public void cancelAllOperations(CancelRequest cancelRequest)
Attempts to cancel all operations in progress on this connection.- Specified by:
cancelAllOperationsin classClientConnection- Parameters:
cancelRequest- An object providing additional information about how the cancel should be processed.
-
cancelAllOperationsExcept
@PublicAPI(stability=PRIVATE, mayInstantiate=false, mayExtend=false, mayInvoke=false) public void cancelAllOperationsExcept(CancelRequest cancelRequest, int messageID)
Attempts to cancel all operations in progress on this connection except the operation with the specified message ID.- Specified by:
cancelAllOperationsExceptin classClientConnection- Parameters:
cancelRequest- An object providing additional information about how the cancel should be processed.messageID- The message ID of the operation that should not be canceled.
-
getMonitorSummary
public 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. It should be in a format that is both human readable and machine parseable (e.g., a space-delimited name-value list, with quotes around the values).- Specified by:
getMonitorSummaryin classClientConnection- Returns:
- 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.
-
toString
public void toString(StringBuilder buffer)
Appends a string representation of this client connection to the provided buffer.- Specified by:
toStringin classClientConnection- Parameters:
buffer- The buffer to which the information should be appended.
-
getNumberOfOperations
public long getNumberOfOperations()
To be implemented.- Specified by:
getNumberOfOperationsin classClientConnection- Returns:
- number of operations performed on this connection
-
getSSF
public int getSSF()
Description copied from class:ClientConnectionReturn the Security Strength Factor of a client connection.- Specified by:
getSSFin classClientConnection- Returns:
- An integer representing the SSF value of a connection.
-
-