Examples of InterceptorChain


Examples of org.apache.cxf.interceptor.InterceptorChain

        Bus bus = ex.get(Bus.class);
        SortedSet<Phase> phases = new TreeSet<Phase>(bus.getExtension(PhaseManager.class).getOutPhases());

        //TODO Set Coloc FaultObserver chain
        ColocUtil.setPhases(phases, Phase.SETUP, Phase.USER_LOGICAL);
        InterceptorChain chain = ColocUtil.getOutInterceptorChain(ex, phases);

        if (LOG.isLoggable(Level.FINER)) {
            LOG.finer("Processing Message at collocated endpoint.  Response message: " + msg);
        }

        //Initiate OutBound Processing
        BindingOperationInfo boi = ex.get(BindingOperationInfo.class);
        Message outBound = ex.getOutMessage();
        if (boi != null) {
            outBound.put(MessageInfo.class,
                         boi.getOperationInfo().getOutput());
        }

        outBound.put(Message.INBOUND_MESSAGE, Boolean.FALSE);
        outBound.setInterceptorChain(chain);
        chain.doIntercept(outBound);
    }
View Full Code Here

Examples of org.apache.cxf.interceptor.InterceptorChain

            }
   
            //Add all interceptors between USER_LOGICAL and INVOKE.
            SortedSet<Phase> phases = new TreeSet<Phase>(bus.getExtension(PhaseManager.class).getInPhases());
            ColocUtil.setPhases(phases, Phase.USER_LOGICAL, Phase.INVOKE);
            InterceptorChain chain = ColocUtil.getInInterceptorChain(ex, phases);
            chain.add(addColocInterceptors());
            inMsg.setInterceptorChain(chain);
   
            //Convert the coloc object type if necessary
            OperationInfo soi = m.getExchange().get(OperationInfo.class);
            if (soi != null && oi != null) {
                if (ColocUtil.isAssignableOperationInfo(soi, Source.class)
                    && !ColocUtil.isAssignableOperationInfo(oi, Source.class)) {
                    // converting source -> pojo
                    ColocUtil.convertSourceToObject(inMsg);
                } else if (ColocUtil.isAssignableOperationInfo(oi, Source.class)
                    && !ColocUtil.isAssignableOperationInfo(soi, Source.class)) {
                    // converting pojo -> source
                    ColocUtil.convertObjectToSource(inMsg);
                }
            }
            chain.doIntercept(inMsg);
            if (soi != null && oi != null) {
                if (ColocUtil.isAssignableOperationInfo(soi, Source.class)
                    && !ColocUtil.isAssignableOperationInfo(oi, Source.class)
                    && ex.getOutMessage() != null) {
                    // converting pojo -> source               
View Full Code Here

Examples of org.apache.cxf.interceptor.InterceptorChain

        if (srv != null) {
            if (LOG.isLoggable(Level.FINE)) {
                LOG.fine("Operation:" + boi.getName() + " dispatched as colocated call.");
            }

            InterceptorChain outChain = message.getInterceptorChain();
            outChain.abort();
            exchange.put(Bus.class, bus);
            message.put(COLOCATED, Boolean.TRUE);
            message.put(Message.WSDL_OPERATION, boi.getName());
            message.put(Message.WSDL_INTERFACE, boi.getBinding().getInterface().getName());
            invokeColocObserver(message, srv.getEndpoint());
View Full Code Here

Examples of org.apache.cxf.interceptor.InterceptorChain

            ex.setInMessage(inMsg);
            PhaseManager pm = bus.getExtension(PhaseManager.class);
            SortedSet<Phase> phases = new TreeSet<Phase>(pm.getInPhases());
            ColocUtil.setPhases(phases, Phase.USER_LOGICAL, Phase.PRE_INVOKE);
           
            InterceptorChain chain = ColocUtil.getInInterceptorChain(ex, phases);       
            inMsg.setInterceptorChain(chain);       
            chain.doIntercept(inMsg);
        }
        ex.put(ClientImpl.FINISHED, Boolean.TRUE);
    }
View Full Code Here

Examples of org.apache.directory.server.core.interceptor.InterceptorChain

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

                // Call the Add method
                InterceptorChain interceptorChain = directoryService.getInterceptorChain();
                interceptorChain.add( opContext );
            }
        }
        finally
        {
            pop();
View Full Code Here

Examples of org.apache.flume.interceptor.InterceptorChain

  private final ChannelSelector selector;
  private final InterceptorChain interceptorChain;

  public ChannelProcessor(ChannelSelector selector) {
    this.selector = selector;
    this.interceptorChain = new InterceptorChain();
  }
View Full Code Here

Examples of org.apache.ldap.server.interceptor.InterceptorChain

        provider = new JndiProvider( nexus );

        // --------------------------------------------------------------------
        // Adding interceptors
        // --------------------------------------------------------------------
        InterceptorChain interceptor = ( InterceptorChain ) initialEnv.get( EnvKeys.INTERCEPTORS );

        if( interceptor == null )
        {
            // If custom interceptor is not specified, use defaule one.

            interceptor = InterceptorChain.newDefaultChain();
        }

        interceptor.init( new InterceptorContext( initialEnv, system, globalRegistries, nexus,
                InterceptorConfigBuilder.build( initialEnv, EnvKeys.INTERCEPTORS ) ) );

        provider.setInterceptor( interceptor );

        // fire up the app partitions now!
View Full Code Here

Examples of org.apache.servicemix.soap.api.InterceptorChain

        msg.setContent(MessageExchange.class, exchange);
        msg.setContent(NormalizedMessage.class, inMsg);
        msg.setContent(OutputStream.class, baos);
        exchange.setProperty(Message.class.getName(), msg);

        InterceptorChain phaseOut = getChain(Phase.ClientOut);
        phaseOut.doIntercept(msg);
        httpExchange.setMethod(HttpMethods.POST);
        httpExchange.setURL(baseUrl);
        httpExchange.setRequestContent(new ByteArrayBuffer(baos.toByteArray()));
        /*
        httpExchange.setRequestEntity(new Entity() {
View Full Code Here

Examples of org.infinispan.interceptors.InterceptorChain

      CommandsFactory commandsFactory = mock(CommandsFactory.class);
      CacheLoaderManager cacheLoaderManager = mock(CacheLoaderManager.class);
      DataContainer dataContainer = mock(DataContainer.class);
      TransactionTable transactionTable = mock(TransactionTable.class);
      StateTransferLock stateTransferLock = mock(StateTransferLock.class);
      InterceptorChain interceptorChain = mock(InterceptorChain.class);
      InvocationContextContainer icc = mock(InvocationContextContainer.class);

      when(commandsFactory.buildStateRequestCommand(any(StateRequestCommand.Type.class), any(Address.class), anyInt(), any(Set.class))).thenAnswer(new Answer<StateRequestCommand>() {
         @Override
         public StateRequestCommand answer(InvocationOnMock invocation) {
View Full Code Here

Examples of org.infinispan.interceptors.InterceptorChain

      UnpreparedDuringRehashTask ut = new UnpreparedDuringRehashTask(firstNode, txsStarted, txsReady, joinEnded, rehashStarted);
      PrepareDuringRehashTask pt = new PrepareDuringRehashTask(firstNode, txsStarted, txsReady, joinEnded, rehashStarted);
      CommitDuringRehashTask ct = new CommitDuringRehashTask(firstNode, txsStarted, txsReady, joinEnded, rehashStarted);

      InterceptorChain ic = TestingUtil.extractComponent(firstNode, InterceptorChain.class);
      ic.addInterceptorAfter(pt, TxInterceptor.class);
      ic.addInterceptorAfter(ct, TxInterceptor.class);


      Set<Thread> threads = new HashSet<Thread>();
      threads.add(new Thread(ut, "Worker-UnpreparedDuringRehashTask"));
      threads.add(new Thread(pt, "Worker-PrepareDuringRehashTask"));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.