| | |
| | | */ |
| | | public void handleNotification(Notification notif, Object handback) |
| | | { |
| | | |
| | | JMXConnectionNotification jcn ; |
| | | |
| | | // |
| | |
| | | */ |
| | | public long nextOperationID() |
| | | { |
| | | |
| | | long opID = nextOperationID.getAndIncrement(); |
| | | if (opID < 0) |
| | | { |
| | |
| | | */ |
| | | public int nextMessageID() |
| | | { |
| | | |
| | | int msgID = nextMessageID.getAndIncrement(); |
| | | if (msgID < 0) |
| | | { |
| | |
| | | */ |
| | | public long getConnectionID() |
| | | { |
| | | |
| | | return connectionID; |
| | | } |
| | | |
| | |
| | | */ |
| | | public ConnectionHandler getConnectionHandler() |
| | | { |
| | | |
| | | return jmxConnectionHandler; |
| | | } |
| | | |
| | |
| | | */ |
| | | public String getProtocol() |
| | | { |
| | | |
| | | return "jmx"; |
| | | } |
| | | |
| | |
| | | */ |
| | | public String getClientAddress() |
| | | { |
| | | |
| | | return "jmx"; |
| | | } |
| | | |
| | |
| | | */ |
| | | public String getServerAddress() |
| | | { |
| | | |
| | | return "jmx"; |
| | | } |
| | | |
| | |
| | | */ |
| | | public InetAddress getRemoteAddress() |
| | | { |
| | | |
| | | return null; |
| | | } |
| | | |
| | |
| | | */ |
| | | public InetAddress getLocalAddress() |
| | | { |
| | | |
| | | return null; |
| | | } |
| | | |
| | |
| | | */ |
| | | public boolean isSecure() |
| | | { |
| | | |
| | | return securityProvider.isSecure(); |
| | | } |
| | | |
| | |
| | | */ |
| | | public ConnectionSecurityProvider getConnectionSecurityProvider() |
| | | { |
| | | |
| | | return securityProvider; |
| | | } |
| | | |
| | |
| | | public void setConnectionSecurityProvider(ConnectionSecurityProvider |
| | | securityProvider) |
| | | { |
| | | |
| | | this.securityProvider = securityProvider; |
| | | } |
| | | |
| | |
| | | */ |
| | | public String getSecurityMechanism() |
| | | { |
| | | |
| | | return securityProvider.getSecurityMechanismName(); |
| | | } |
| | | |
| | |
| | | */ |
| | | public boolean processDataRead(ByteBuffer buffer) |
| | | { |
| | | |
| | | // This method will not do anything with the data because there is no |
| | | // actual "connection" from which information can be read, nor any protocol |
| | | // to use to read it. |
| | |
| | | */ |
| | | public void sendResponse(Operation operation) |
| | | { |
| | | |
| | | // There will not be any response sent by this method, since there is not an |
| | | // actual connection. |
| | | } |
| | |
| | | public AddOperation processAdd(ASN1OctetString rawEntryDN, |
| | | ArrayList<LDAPAttribute> rawAttributes) |
| | | { |
| | | |
| | | AddOperation addOperation = |
| | | new AddOperation(this, nextOperationID(), nextMessageID(), |
| | | new ArrayList<Control>(0), rawEntryDN, rawAttributes); |
| | |
| | | String attributeType, |
| | | ASN1OctetString assertionValue) |
| | | { |
| | | |
| | | CompareOperation compareOperation = |
| | | new CompareOperation(this, nextOperationID(), nextMessageID(), |
| | | new ArrayList<Control>(0), rawEntryDN, |
| | |
| | | */ |
| | | public DeleteOperation processDelete(ASN1OctetString rawEntryDN) |
| | | { |
| | | |
| | | DeleteOperation deleteOperation = |
| | | new DeleteOperation(this, nextOperationID(), nextMessageID(), |
| | | new ArrayList<Control>(0), rawEntryDN); |
| | |
| | | public ExtendedOperation processExtendedOperation(String requestOID, |
| | | ASN1OctetString requestValue) |
| | | { |
| | | |
| | | ExtendedOperation extendedOperation = |
| | | new ExtendedOperation(this, nextOperationID(), nextMessageID(), |
| | | new ArrayList<Control>(0), requestOID, |
| | |
| | | public ModifyOperation processModify(ASN1OctetString rawEntryDN, |
| | | ArrayList<LDAPModification> rawModifications) |
| | | { |
| | | |
| | | ModifyOperation modifyOperation = |
| | | new ModifyOperation(this, nextOperationID(), nextMessageID(), |
| | | new ArrayList<Control>(0), rawEntryDN, |
| | |
| | | ASN1OctetString rawNewRDN, |
| | | boolean deleteOldRDN) |
| | | { |
| | | |
| | | return processModifyDN(rawEntryDN, rawNewRDN, deleteOldRDN, null); |
| | | } |
| | | |
| | |
| | | boolean deleteOldRDN, |
| | | ASN1OctetString rawNewSuperior) |
| | | { |
| | | |
| | | ModifyDNOperation modifyDNOperation = |
| | | new ModifyDNOperation(this, nextOperationID(), nextMessageID(), |
| | | new ArrayList<Control>(0), rawEntryDN, rawNewRDN, |
| | |
| | | public InternalSearchOperation processSearch(ASN1OctetString rawBaseDN, |
| | | SearchScope scope, LDAPFilter filter) |
| | | { |
| | | |
| | | return processSearch(rawBaseDN, scope, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | filter, new LinkedHashSet<String>(0)); |
| | |
| | | boolean typesOnly, LDAPFilter filter, |
| | | LinkedHashSet<String> attributes) |
| | | { |
| | | |
| | | InternalSearchOperation searchOperation = |
| | | new InternalSearchOperation(this, nextOperationID(), nextMessageID(), |
| | | new ArrayList<Control>(0), rawBaseDN, |
| | |
| | | LinkedHashSet<String> attributes, |
| | | InternalSearchListener searchListener) |
| | | { |
| | | |
| | | InternalSearchOperation searchOperation = |
| | | new InternalSearchOperation(this, nextOperationID(), nextMessageID(), |
| | | new ArrayList<Control>(0), rawBaseDN, |
| | |
| | | public void sendSearchEntry(SearchOperation searchOperation, |
| | | SearchResultEntry searchEntry) |
| | | { |
| | | |
| | | ((InternalSearchOperation) searchOperation).addSearchEntry(searchEntry); |
| | | } |
| | | |
| | |
| | | public boolean sendSearchReference(SearchOperation searchOperation, |
| | | SearchResultReference searchReference) |
| | | { |
| | | |
| | | |
| | | ((InternalSearchOperation) |
| | | searchOperation).addSearchReference(searchReference); |
| | | return true; |
| | |
| | | protected boolean sendIntermediateResponseMessage( |
| | | IntermediateResponse intermediateResponse) |
| | | { |
| | | |
| | | |
| | | // FIXME -- Do we need to support Jmx intermediate responses? If so, |
| | | // then implement this. |
| | | return false; |
| | |
| | | boolean sendNotification, String message, |
| | | int messageID) |
| | | { |
| | | |
| | | // we are already performing a disconnect |
| | | if (disconnectStarted) |
| | | { |
| | |
| | | */ |
| | | public boolean bindInProgress() |
| | | { |
| | | |
| | | // For Jmx operations, we don't care if there are any binds in |
| | | // progress. |
| | | return false; |
| | |
| | | */ |
| | | public void setBindInProgress(boolean bindInProgress) |
| | | { |
| | | |
| | | // No implementation is required. |
| | | } |
| | | |
| | |
| | | */ |
| | | public Collection<Operation> getOperationsInProgress() |
| | | { |
| | | |
| | | return operationList; |
| | | } |
| | | |
| | |
| | | */ |
| | | public Operation getOperationInProgress(int messageID) |
| | | { |
| | | |
| | | // Jmx operations will not be tracked. |
| | | return null; |
| | | } |
| | |
| | | */ |
| | | public boolean removeOperationInProgress(int messageID) |
| | | { |
| | | |
| | | // No implementation is required, since Jmx operations will not be |
| | | // tracked. |
| | | return false; |
| | |
| | | public CancelResult cancelOperation(int messageID, |
| | | CancelRequest cancelRequest) |
| | | { |
| | | |
| | | // Jmx operations cannot be cancelled. |
| | | return CancelResult.CANNOT_CANCEL; |
| | | } |
| | |
| | | */ |
| | | public void cancelAllOperations(CancelRequest cancelRequest) |
| | | { |
| | | |
| | | // No implementation is required since Jmx operations cannot be |
| | | // cancelled. |
| | | } |
| | |
| | | public void cancelAllOperationsExcept(CancelRequest cancelRequest, |
| | | int messageID) |
| | | { |
| | | |
| | | // No implementation is required since Jmx operations cannot be |
| | | // cancelled. |
| | | } |
| | |
| | | */ |
| | | public String getMonitorSummary() |
| | | { |
| | | |
| | | StringBuilder buffer = new StringBuilder(); |
| | | buffer.append("connID=\""); |
| | | buffer.append(connectionID); |