Class InMemoryOperationInterceptor


  • @Extensible
    @ThreadSafety(level=INTERFACE_THREADSAFE)
    public abstract class InMemoryOperationInterceptor
    extends java.lang.Object
    This class defines an API that may be used to intercept and potentially alter communication between an LDAP client and the in-memory directory server. An operation interceptor may be enabled for use with the in-memory directory server by registering it with the InMemoryDirectoryServerConfig. The default implementation of all methods defined in this class is to return the provided request or result without altering it in any way.

    Note that any operation interceptors configured for use will be invoked only for requests received via LDAP. Operations processed via method calls made directly to the InMemoryDirectoryServer class via the LDAPInterface interface will not cause any operation interceptors to be invoked.
    • Method Detail

      • processAddRequest

        public void processAddRequest​(InMemoryInterceptedAddRequest request)
                               throws LDAPException
        Invokes any processing that should be performed for the provided add request before it is passed to the in-memory directory server.
        Parameters:
        request - Information about the request that was received from the client.
        Throws:
        LDAPException - If the provided operation should not be passed onto the in-memory directory server, but the result represented by this exception should be used instead.
      • processAddResult

        public void processAddResult​(InMemoryInterceptedAddResult result)
        Invokes any processing that should be performed for the provided add result before it is returned to the client.
        Parameters:
        result - Information about the add result that is to be returned to the client.
      • processSimpleBindRequest

        public void processSimpleBindRequest​(InMemoryInterceptedSimpleBindRequest request)
                                      throws LDAPException
        Invokes any processing that should be performed for the provided simple bind request before it is passed to the in-memory directory server.
        Parameters:
        request - Information about the request that was received from the client.
        Throws:
        LDAPException - If the provided operation should not be passed onto the in-memory directory server, but the result represented by this exception should be used instead.
      • processSimpleBindResult

        public void processSimpleBindResult​(InMemoryInterceptedSimpleBindResult result)
        Invokes any processing that should be performed for the provided simple bind result before it is returned to the client.
        Parameters:
        result - Information about the bind result that is to be returned to the client.
      • processSASLBindRequest

        public void processSASLBindRequest​(InMemoryInterceptedSASLBindRequest request)
                                    throws LDAPException
        Invokes any processing that should be performed for the provided SASL bind request before it is passed to the in-memory directory server.
        Parameters:
        request - Information about the request that was received from the client.
        Throws:
        LDAPException - If the provided operation should not be passed onto the in-memory directory server, but the result represented by this exception should be used instead.
      • processSASLBindResult

        public void processSASLBindResult​(InMemoryInterceptedSASLBindResult result)
        Invokes any processing that should be performed for the provided SASL bind result before it is returned to the client.
        Parameters:
        result - Information about the bind result that is to be returned to the client.
      • processCompareRequest

        public void processCompareRequest​(InMemoryInterceptedCompareRequest request)
                                   throws LDAPException
        Invokes any processing that should be performed for the provided compare request before it is passed to the in-memory directory server.
        Parameters:
        request - Information about the request that was received from the client.
        Throws:
        LDAPException - If the provided operation should not be passed onto the in-memory directory server, but the result represented by this exception should be used instead.
      • processCompareResult

        public void processCompareResult​(InMemoryInterceptedCompareResult result)
        Invokes any processing that should be performed for the provided compare result before it is returned to the client.
        Parameters:
        result - Information about the compare result that is to be returned to the client.
      • processDeleteRequest

        public void processDeleteRequest​(InMemoryInterceptedDeleteRequest request)
                                  throws LDAPException
        Invokes any processing that should be performed for the provided delete request before it is passed to the in-memory directory server.
        Parameters:
        request - Information about the request that was received from the client.
        Throws:
        LDAPException - If the provided operation should not be passed onto the in-memory directory server, but the result represented by this exception should be used instead.
      • processDeleteResult

        public void processDeleteResult​(InMemoryInterceptedDeleteResult result)
        Invokes any processing that should be performed for the provided delete result before it is returned to the client.
        Parameters:
        result - Information about the delete result that is to be returned to the client.
      • processExtendedRequest

        public void processExtendedRequest​(InMemoryInterceptedExtendedRequest request)
                                    throws LDAPException
        Invokes any processing that should be performed for the provided extended request before it is passed to the in-memory directory server.
        Parameters:
        request - Information about the request that was received from the client.
        Throws:
        LDAPException - If the provided operation should not be passed onto the in-memory directory server, but the result represented by this exception should be used instead.
      • processExtendedResult

        public void processExtendedResult​(InMemoryInterceptedExtendedResult result)
        Invokes any processing that should be performed for the provided extended result before it is returned to the client.
        Parameters:
        result - Information about the extended result that is to be returned to the client.
      • processModifyRequest

        public void processModifyRequest​(InMemoryInterceptedModifyRequest request)
                                  throws LDAPException
        Invokes any processing that should be performed for the provided modify request before it is passed to the in-memory directory server.
        Parameters:
        request - Information about the request that was received from the client.
        Throws:
        LDAPException - If the provided operation should not be passed onto the in-memory directory server, but the result represented by this exception should be used instead.
      • processModifyResult

        public void processModifyResult​(InMemoryInterceptedModifyResult result)
        Invokes any processing that should be performed for the provided modify result before it is returned to the client.
        Parameters:
        result - Information about the modify result that is to be returned to the client.
      • processModifyDNRequest

        public void processModifyDNRequest​(InMemoryInterceptedModifyDNRequest request)
                                    throws LDAPException
        Invokes any processing that should be performed for the provided modify DN request before it is passed to the in-memory directory server.
        Parameters:
        request - Information about the request that was received from the client.
        Throws:
        LDAPException - If the provided operation should not be passed onto the in-memory directory server, but the result represented by this exception should be used instead.
      • processModifyDNResult

        public void processModifyDNResult​(InMemoryInterceptedModifyDNResult result)
        Invokes any processing that should be performed for the provided modify DN result before it is returned to the client.
        Parameters:
        result - Information about the modify DN result that is to be returned to the client.
      • processSearchRequest

        public void processSearchRequest​(InMemoryInterceptedSearchRequest request)
                                  throws LDAPException
        Invokes any processing that should be performed for the provided search request before it is passed to the in-memory directory server.
        Parameters:
        request - Information about the request that was received from the client.
        Throws:
        LDAPException - If the provided operation should not be passed onto the in-memory directory server, but the result represented by this exception should be used instead.
      • processSearchEntry

        public void processSearchEntry​(InMemoryInterceptedSearchEntry entry)
        Invokes any processing that should be performed for the provided search result entry before it is returned to the client.
        Parameters:
        entry - Information about the search result entry to be returned
      • processSearchReference

        public void processSearchReference​(InMemoryInterceptedSearchReference reference)
        Invokes any processing that should be performed for the provided search result reference before it is returned to the client.
        Parameters:
        reference - Information about the search result reference to be returned
      • processSearchResult

        public void processSearchResult​(InMemoryInterceptedSearchResult result)
        Invokes any processing that should be performed for the provided search result before it is returned to the client.
        Parameters:
        result - Information about the search result that is to be returned to the client.
      • processIntermediateResponse

        public void processIntermediateResponse​(InMemoryInterceptedIntermediateResponse response)
        Invokes any processing that should be performed for the provided intermediate response before it is returned to the client.
        Parameters:
        response - Information about the intermediate response to be returned to the client.