|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.api.ClientConnection
org.opends.server.protocols.jmx.JmxClientConnection
public class JmxClientConnection
This class defines the set of methods and structures that must be implemented by a Directory Server client connection.
Field Summary | |
---|---|
protected java.lang.String |
jmxConnectionID
The JMX connection ID for this client connection. |
Constructor Summary | |
---|---|
JmxClientConnection(JmxConnectionHandler jmxConnectionHandler,
AuthenticationInfo authInfo)
Creates a new Jmx client connection that will be authenticated as as the specified user. |
Method Summary | |
---|---|
boolean |
bindInProgress()
Indicates whether a bind operation is in progress on this client connection. |
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,
Message message)
Closes the connection to the client, optionally sending it a message indicating the reason for the closure. |
protected void |
finalize()
Called by the Gc when the object is garbage collected Release the cursor in case the iterator was badly used and releaseCursor was never called. |
java.lang.String |
getClientAddress()
Retrieves a string representation of the address of the client. |
ConnectionHandler |
getConnectionHandler()
Retrieves the connection handler that accepted this client connection. |
long |
getConnectionID()
Retrieves the unique identifier that has been assigned to this connection. |
ConnectionSecurityProvider |
getConnectionSecurityProvider()
Retrieves the connection security provider for this client connection. |
java.net.InetAddress |
getLocalAddress()
Retrieves the java.net.InetAddress for the Directory Server
system to which the client has established the connection. |
java.lang.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. |
AbstractOperation |
getOperationInProgress(int messageID)
Retrieves the operation in progress with the specified message ID. |
java.util.Collection<AbstractOperation> |
getOperationsInProgress()
Retrieves the set of operations in progress for this client connection. |
java.lang.String |
getProtocol()
Retrieves the protocol that the client is using to communicate with the Directory Server. |
java.net.InetAddress |
getRemoteAddress()
Retrieves the java.net.InetAddress associated with the remote
client system. |
java.lang.String |
getSecurityMechanism()
Retrieves the human-readable name of the security mechanism that is used to protect communication with this client. |
java.lang.String |
getServerAddress()
Retrieves a string representation of the address on the server to which the client connected. |
void |
handleNotification(javax.management.Notification notif,
java.lang.Object handback)
|
boolean |
isSecure()
Indicates whether this client connection is currently using a secure mechanism to communicate with the server. |
int |
nextMessageID()
Retrieves the message ID that should be used for the next Jmx operation. |
long |
nextOperationID()
Retrieves the operation ID that should be used for the next Jmx operation. |
AddOperation |
processAdd(ASN1OctetString rawEntryDN,
java.util.ArrayList<RawAttribute> rawAttributes)
Processes an Jmx add operation with the provided information. |
AddOperation |
processAdd(DN entryDN,
java.util.Map<ObjectClass,java.lang.String> objectClasses,
java.util.Map<AttributeType,java.util.List<Attribute>> userAttributes,
java.util.Map<AttributeType,java.util.List<Attribute>> operationalAttributes)
Processes an internal add operation with the provided information. |
CompareOperation |
processCompare(ASN1OctetString rawEntryDN,
java.lang.String attributeType,
ASN1OctetString assertionValue)
Processes an Jmx compare operation with the provided information. |
boolean |
processDataRead(java.nio.ByteBuffer buffer)
Indicates that the data in the provided buffer has been read from the client and should be processed. |
DeleteOperation |
processDelete(ASN1OctetString rawEntryDN)
Processes an Jmx delete operation with the provided information. |
DeleteOperation |
processDelete(DN entryDN)
Processes an internal delete operation with the provided information. |
ExtendedOperation |
processExtendedOperation(java.lang.String requestOID,
ASN1OctetString requestValue)
Processes an Jmx extended operation with the provided information. |
ModifyOperation |
processModify(ASN1OctetString rawEntryDN,
java.util.ArrayList<RawModification> rawModifications)
Processes an Jmx modify operation with the provided information. |
ModifyOperation |
processModify(DN entryDN,
java.util.List<Modification> modifications)
Processes an internal modify operation with the provided information. |
ModifyDNOperation |
processModifyDN(ASN1OctetString rawEntryDN,
ASN1OctetString rawNewRDN,
boolean deleteOldRDN)
Processes an Jmx modify DN operation with the provided information. |
ModifyDNOperation |
processModifyDN(ASN1OctetString rawEntryDN,
ASN1OctetString rawNewRDN,
boolean deleteOldRDN,
ASN1OctetString rawNewSuperior)
Processes an Jmx modify DN operation with the provided information. |
ModifyDNOperation |
processModifyDN(DN entryDN,
RDN newRDN,
boolean deleteOldRDN,
DN newSuperior)
Processes an internal modify DN operation with the provided information. |
InternalSearchOperation |
processSearch(ASN1OctetString rawBaseDN,
SearchScope scope,
DereferencePolicy derefPolicy,
int sizeLimit,
int timeLimit,
boolean typesOnly,
LDAPFilter filter,
java.util.LinkedHashSet<java.lang.String> attributes)
Processes an Jmx search operation with the provided information. |
InternalSearchOperation |
processSearch(ASN1OctetString rawBaseDN,
SearchScope scope,
DereferencePolicy derefPolicy,
int sizeLimit,
int timeLimit,
boolean typesOnly,
LDAPFilter filter,
java.util.LinkedHashSet<java.lang.String> attributes,
InternalSearchListener searchListener)
Processes an Jmx search operation with the provided information. |
InternalSearchOperation |
processSearch(ASN1OctetString rawBaseDN,
SearchScope scope,
LDAPFilter filter)
Processes an Jmx search operation with the provided information. |
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 |
setBindInProgress(boolean bindInProgress)
Specifies whether a bind operation is in progress on this client connection. |
void |
setConnectionSecurityProvider(ConnectionSecurityProvider securityProvider)
Specifies the connection security provider for this client connection. |
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this client connection to the provided buffer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.lang.String jmxConnectionID
Constructor Detail |
---|
public JmxClientConnection(JmxConnectionHandler jmxConnectionHandler, AuthenticationInfo authInfo)
jmxConnectionHandler
- The connection handler on which we should be registeredauthInfo
- the User authentication infoMethod Detail |
---|
public void handleNotification(javax.management.Notification notif, java.lang.Object handback)
handleNotification
in interface javax.management.NotificationListener
public long nextOperationID()
public int nextMessageID()
public long getConnectionID()
getConnectionID
in class ClientConnection
public ConnectionHandler getConnectionHandler()
getConnectionHandler
in class ClientConnection
public java.lang.String getProtocol()
getProtocol
in class ClientConnection
public java.lang.String getClientAddress()
getClientAddress
in class ClientConnection
public java.lang.String getServerAddress()
getServerAddress
in class ClientConnection
public java.net.InetAddress getRemoteAddress()
java.net.InetAddress
associated with the remote
client system.
getRemoteAddress
in class ClientConnection
java.net.InetAddress
associated with the remote
client system. It may be null
if the client is not
connected over an IP-based connection.public java.net.InetAddress getLocalAddress()
java.net.InetAddress
for the Directory Server
system to which the client has established the connection.
getLocalAddress
in class ClientConnection
java.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 isSecure()
false
to true
if the client uses the
StartTLS extended operation).
isSecure
in class ClientConnection
true
if the client connection is currently using a
secure mechanism to communicate with the server, or
false
if not.public ConnectionSecurityProvider getConnectionSecurityProvider()
getConnectionSecurityProvider
in class ClientConnection
public void setConnectionSecurityProvider(ConnectionSecurityProvider securityProvider)
setConnectionSecurityProvider
in class ClientConnection
securityProvider
- The connection security provider to use for
communication on this client connection.public java.lang.String getSecurityMechanism()
getSecurityMechanism
in class ClientConnection
null
if no
security is in place.public boolean processDataRead(java.nio.ByteBuffer buffer)
processDataRead
in class ClientConnection
buffer
- The byte buffer containing the data available for reading.
true
if all the data in the provided buffer was
processed and the client connection can remain established, or
false
if a decoding error occurred and requests from
this client should no longer be processed. Note that if this
method does return false
, then it must have already
disconnected the client.public void sendResponse(Operation operation)
sendResponse
in class ClientConnection
operation
- The operation for which to send the response.public AddOperation processAdd(ASN1OctetString rawEntryDN, java.util.ArrayList<RawAttribute> rawAttributes)
rawEntryDN
- The DN to use for the entry to add.rawAttributes
- The set of attributes to include in the entry to
add.
public AddOperation processAdd(DN entryDN, java.util.Map<ObjectClass,java.lang.String> objectClasses, java.util.Map<AttributeType,java.util.List<Attribute>> userAttributes, java.util.Map<AttributeType,java.util.List<Attribute>> operationalAttributes)
entryDN
- The entry DN for the add
operation.objectClasses
- The set of objectclasses for the
add operation.userAttributes
- The set of user attributes for the
add operation.operationalAttributes
- The set of operational attributes
for the add operation.
public DeleteOperation processDelete(DN entryDN)
entryDN
- The entry DN for the delete operation.
public CompareOperation processCompare(ASN1OctetString rawEntryDN, java.lang.String attributeType, ASN1OctetString assertionValue)
rawEntryDN
- The entry DN for the compare operation.attributeType
- The attribute type for the compare operation.assertionValue
- The assertion value for the compare operation.
public DeleteOperation processDelete(ASN1OctetString rawEntryDN)
rawEntryDN
- The entry DN for the delete operation.
public ExtendedOperation processExtendedOperation(java.lang.String requestOID, ASN1OctetString requestValue)
requestOID
- The OID for the extended request.requestValue
- The encoded +value for the extended operation, or
null
if there is no value.
public ModifyOperation processModify(ASN1OctetString rawEntryDN, java.util.ArrayList<RawModification> rawModifications)
rawEntryDN
- The raw entry DN for this modify operation.rawModifications
- The set of modifications for this modify
operation.
public ModifyOperation processModify(DN entryDN, java.util.List<Modification> modifications)
entryDN
- The entry DN for this modify operation.modifications
- The set of modifications for this modify
operation.
public ModifyDNOperation processModifyDN(ASN1OctetString rawEntryDN, ASN1OctetString rawNewRDN, boolean deleteOldRDN)
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.
public ModifyDNOperation processModifyDN(ASN1OctetString rawEntryDN, ASN1OctetString rawNewRDN, boolean deleteOldRDN, ASN1OctetString rawNewSuperior)
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, or
null
if the entry will remain below
the same parent.
public ModifyDNOperation processModifyDN(DN entryDN, RDN newRDN, boolean deleteOldRDN, DN newSuperior)
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, or null
if the
entry will remain below the same parent.
public InternalSearchOperation processSearch(ASN1OctetString rawBaseDN, SearchScope scope, LDAPFilter filter)
rawBaseDN
- The base DN for the search.scope
- The scope for the search.filter
- The filter for the search.
public InternalSearchOperation processSearch(ASN1OctetString rawBaseDN, SearchScope scope, DereferencePolicy derefPolicy, int sizeLimit, int timeLimit, boolean typesOnly, LDAPFilter filter, java.util.LinkedHashSet<java.lang.String> attributes)
rawBaseDN
- The base DN for the search.scope
- The scope for the search.derefPolicy
- The alias dereferencing policy for the search.sizeLimit
- The size limit for the search.timeLimit
- The time limit for the search.typesOnly
- The typesOnly flag for the search.filter
- The filter for the search.attributes
- The set of requested attributes for the search.
public InternalSearchOperation processSearch(ASN1OctetString rawBaseDN, SearchScope scope, DereferencePolicy derefPolicy, int sizeLimit, int timeLimit, boolean typesOnly, LDAPFilter filter, java.util.LinkedHashSet<java.lang.String> attributes, InternalSearchListener searchListener)
rawBaseDN
- The base DN for the search.scope
- The scope for the search.derefPolicy
- The alias dereferencing policy for the search.sizeLimit
- The size limit for the search.timeLimit
- The time limit for the search.typesOnly
- The typesOnly flag for the search.filter
- The filter for the search.attributes
- The set of requested attributes for the search.searchListener
- The internal search listener that should be used to
handle the matching entries and references.
public void sendSearchEntry(SearchOperation searchOperation, SearchResultEntry searchEntry) throws DirectoryException
sendSearchEntry
in class ClientConnection
searchOperation
- The search operation with which the entry is
associated.searchEntry
- The search result entry to be sent to the client.
DirectoryException
- If a problem occurs while attempting to send
the entry to the client and the search should
be terminated.public boolean sendSearchReference(SearchOperation searchOperation, SearchResultReference searchReference) throws DirectoryException
sendSearchReference
in class ClientConnection
searchOperation
- 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.
DirectoryException
- If a problem occurs while attempting to send
the reference to the client and the search
should be terminated.protected boolean sendIntermediateResponseMessage(IntermediateResponse intermediateResponse)
sendIntermediateResponseMessage
in class ClientConnection
intermediateResponse
- 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, Message message)
disconnect
in class ClientConnection
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 be
null
if no notification is to be
sent.public boolean bindInProgress()
bindInProgress
in class ClientConnection
true
if a bind operation is in progress on this
connection, or false
if not.public void setBindInProgress(boolean bindInProgress)
setBindInProgress
in class ClientConnection
bindInProgress
- Specifies whether a bind operation is in progress
on this client connection.public java.util.Collection<AbstractOperation> getOperationsInProgress()
getOperationsInProgress
in class ClientConnection
public AbstractOperation getOperationInProgress(int messageID)
getOperationInProgress
in class ClientConnection
messageID
- The message ID of the operation to retrieve.
null
if no such operation could be found.public boolean removeOperationInProgress(int messageID)
removeOperationInProgress
in class ClientConnection
messageID
- 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 ClientConnection
messageID
- 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 ClientConnection
cancelRequest
- An object providing additional information about how
the cancel should be processed.public void cancelAllOperationsExcept(CancelRequest cancelRequest, int messageID)
cancelAllOperationsExcept
in class ClientConnection
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.public java.lang.String getMonitorSummary()
getMonitorSummary
in class ClientConnection
public void toString(java.lang.StringBuilder buffer)
toString
in class ClientConnection
buffer
- The buffer to which the information should be appended.protected void finalize()
finalize
in class ClientConnection
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |