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

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


  /**
   * 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


    {
        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

        {
            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

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

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

            try
            {
                lockWrite();

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

        }

        ensureStarted();

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

        try
        {
            lockRead();

            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;

        try
        {
            lockRead();

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

            lockWrite();

            eagerlyPopulateFields( deleteContext );

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

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

            LOG.debug( ">> GetRootDseOperation : {}", getRootDseContext );
        }

        ensureStarted();

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

        Entry root = head.getRootDse( getRootDseContext );

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

            LOG.debug( ">> hasEntryOperation : {}", hasEntryContext );
        }

        ensureStarted();

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

        boolean result = false;

        try
        {
            lockRead();

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

            LOG.debug( ">> ListOperation : {}", listContext );
        }

        ensureStarted();

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

        EntryFilteringCursor cursor = null;

        try
        {
            lockRead();

            cursor = head.list( listContext );
        }
        finally
        {
            unlockRead();
        }
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.