Package org.apache.directory.server.core.api.interceptor

Examples of org.apache.directory.server.core.api.interceptor.Interceptor


    {
        try
        {
            // Inject the interceptor that waits 1 second when binding
            // in order to be able to send a request before we get the response
            Interceptor interceptor = new BaseInterceptor( "test" )
            {
                /**
                 * Wait 1 second before going any further
                 */
                public void bind( BindOperationContext bindContext ) throws LdapException
View Full Code Here


    /**
     * Remove an interceptor to the list of interceptors to call for each operation
     */
    private void removeOperationsList( String interceptorName )
    {
        Interceptor interceptor = interceptorNames.get( interceptorName );

        writeLock.lock();

        try
        {
            for ( OperationEnum operation : OperationEnum.getOperations() )
            {
                List<String> operationList = operationInterceptors.get( operation );

                Method[] methods = interceptor.getClass().getDeclaredMethods();

                for ( Method method : methods )
                {
                    if ( method.getName().equals( operation.getMethodName() ) )
                    {
                        operationList.remove( interceptor.getName() );

                        break;
                    }
                }
            }
View Full Code Here

            // Unlock the referral manager
            directoryService.getReferralManager().unlock();
        }

        // Call the Add method
        Interceptor head = directoryService.getInterceptor( addContext.getNextInterceptor() );

        lockWrite();

        try
        {
            head.add( addContext );
        }
        finally
        {
            unlockWrite();
        }
View Full Code Here

        }

        ensureStarted();

        // Call the Delete method
        Interceptor head = directoryService.getInterceptor( bindContext.getNextInterceptor() );

        lockRead();

        try
        {
            head.bind( bindContext );
        }
        finally
        {
            unlockRead();
        }
View Full Code Here

        // populate the context with the old entry
        compareContext.setOriginalEntry( getOriginalEntry( compareContext ) );

        // Call the Compare method
        Interceptor head = directoryService.getInterceptor( compareContext.getNextInterceptor() );

        boolean result = false;

        lockRead();

        try
        {
            result = head.compare( compareContext );
        }
        finally
        {
            unlockRead();
        }
View Full Code Here

        try
        {
            eagerlyPopulateFields( deleteContext );

            // Call the Delete method
            Interceptor head = directoryService.getInterceptor( deleteContext.getNextInterceptor() );

            head.delete( deleteContext );
        }
        finally
        {
            unlockWrite();
        }
View Full Code Here

            opStart = System.nanoTime();
        }

        ensureStarted();

        Interceptor head = directoryService.getInterceptor( getRootDseContext.getNextInterceptor() );

        Entry root = head.getRootDse( getRootDseContext );

        if ( IS_DEBUG )
        {
            OPERATION_LOG.debug( "<< getRootDseOperation successful" );
        }
View Full Code Here

            opStart = System.nanoTime();
        }

        ensureStarted();

        Interceptor head = directoryService.getInterceptor( hasEntryContext.getNextInterceptor() );

        boolean result = false;

        lockRead();

        try
        {
            result = head.hasEntry( hasEntryContext );
        }
        finally
        {
            unlockRead();
        }
View Full Code Here

            opStart = System.nanoTime();
        }

        ensureStarted();

        Interceptor head = directoryService.getInterceptor( lookupContext.getNextInterceptor() );

        Entry entry = null;

        lockRead();

        try
        {
            entry = head.lookup( lookupContext );
        }
        finally
        {
            unlockRead();
        }
View Full Code Here

        {
            // populate the context with the old entry
            eagerlyPopulateFields( modifyContext );

            // Call the Modify method
            Interceptor head = directoryService.getInterceptor( modifyContext.getNextInterceptor() );

            head.modify( modifyContext );
        }
        finally
        {
            unlockWrite();
        }
View Full Code Here

TOP

Related Classes of org.apache.directory.server.core.api.interceptor.Interceptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.