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

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


            Entry originalEntry = getOriginalEntry( moveContext );

            moveContext.setOriginalEntry( originalEntry );

            // Call the Move method
            Interceptor head = directoryService.getInterceptor( moveContext.getNextInterceptor() );

            head.move( moveContext );
        }
        finally
        {
            unlockWrite();
        }
View Full Code Here


        {
            moveAndRenameContext.setOriginalEntry( getOriginalEntry( moveAndRenameContext ) );
            moveAndRenameContext.setModifiedEntry( moveAndRenameContext.getOriginalEntry().clone() );

            // Call the MoveAndRename method
            Interceptor head = directoryService.getInterceptor( moveAndRenameContext.getNextInterceptor() );

            head.moveAndRename( moveAndRenameContext );
        }
        finally
        {
            unlockWrite();
        }
View Full Code Here

            Entry originalEntry = getOriginalEntry( renameContext );
            renameContext.setOriginalEntry( originalEntry );
            renameContext.setModifiedEntry( originalEntry.clone() );

            // Call the Rename method
            Interceptor head = directoryService.getInterceptor( renameContext.getNextInterceptor() );

            head.rename( renameContext );
        }
        finally
        {
            unlockWrite();
        }
View Full Code Here

            // Unlock the ReferralManager
            directoryService.getReferralManager().unlock();
        }

        // Call the Search method
        Interceptor head = directoryService.getInterceptor( searchContext.getNextInterceptor() );

        EntryFilteringCursor cursor = null;

        lockRead();

        try
        {
            cursor = head.search( searchContext );
        }
        finally
        {
            unlockRead();
        }
View Full Code Here

        ensureStarted();

        try
        {
            // Call the Unbind method
            Interceptor head = directoryService.getInterceptor( unbindContext.getNextInterceptor() );

            head.unbind( unbindContext );
        }
        finally
        {
        }
View Full Code Here

        {
            try
            {
                LOG.debug( "loading the interceptor class {} and instantiating",
                    interceptorBean.getInterceptorClassName() );
                Interceptor interceptor = ( Interceptor ) Class.forName( interceptorBean.getInterceptorClassName() )
                    .newInstance();

                if ( interceptorBean instanceof AuthenticationInterceptorBean )
                {
                    // Transports
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

        List<Interceptor> interceptors = service.getInterceptors();

        for ( int i = 0; i < allMechanism.size(); i++ )
        {
            Interceptor hashMech = ( Interceptor ) allMechanism.get( i ).newInstance();
            hashMech.init( service );

            // make sure to remove the last added mechanism
            if ( i > 0 )
            {
                interceptors.remove( interceptors.size() - 1 );
View Full Code Here

        {
            try
            {
                LOG.debug( "loading the interceptor class {} and instantiating",
                    interceptorBean.getInterceptorClassName() );
                Interceptor interceptor = ( Interceptor ) Class.forName( interceptorBean.getInterceptorClassName() )
                    .newInstance();

                if ( interceptorBean instanceof AuthenticationInterceptorBean )
                {
                    // Transports
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

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.