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​(@NotNull
                                      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​(@NotNull
                                     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​(@NotNull
                                             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​(@NotNull
                                            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​(@NotNull
                                           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​(@NotNull
                                          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​(@NotNull
                                          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​(@NotNull
                                         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​(@NotNull
                                         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​(@NotNull
                                        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​(@NotNull
                                           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​(@NotNull
                                          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​(@NotNull
                                         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​(@NotNull
                                        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​(@NotNull
                                           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​(@NotNull
                                          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​(@NotNull
                                         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​(@NotNull
                                       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​(@NotNull
                                           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​(@NotNull
                                        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.