Examples of addInterceptor()


Examples of org.jboss.errai.bus.client.framework.ClientMessageBusImpl.addInterceptor()

public class CDIClientBootstrap implements EntryPoint {
  public void onModuleLoad() {
    final ClientMessageBusImpl bus = (ClientMessageBusImpl) ErraiBus.get();

    // conversation interceptor
    bus.addInterceptor(CDI.CONVERSATION_INTERCEPTOR);

    final Runnable busReadyEvent = new Runnable() {
      public void run() {
        MessageBuilder.createMessage().toSubject("cdi.event:Dispatcher").command(CDICommands.AttachRemote).done()
                .sendNowWith(bus);
View Full Code Here

Examples of org.jboss.weld.manager.BeanManagerImpl.addInterceptor()

    }

    protected <T> void processBean(Bean<T> bean) {
        BeanManagerImpl beanManager = getOrCreateBeanDeployment(bean.getBeanClass()).getBeanManager();
        if (bean instanceof Interceptor<?>) {
            beanManager.addInterceptor((Interceptor<?>) bean);
        } else if (bean instanceof Decorator<?>) {
            beanManager.addDecorator(CustomDecoratorWrapper.of((Decorator<?>) bean, beanManager));
        } else {
            beanManager.addBean(bean);
        }
View Full Code Here

Examples of org.nutz.aop.ClassAgent.addInterceptor()

  @Test
  public void test_duplicate_class_exception() throws Exception {
    int[] cc = new int[4];
    ClassAgent ca = getNewClassAgent();
    ca.addInterceptor(MethodMatcherFactory.matcher(".*"), new MethodCounter(cc));
    ClassAgent ca2 = getNewClassAgent();
    ca2.addInterceptor(MethodMatcherFactory.matcher(".*"), new MethodCounter(cc));

    ClassDefiner cd = Nutzs.cd();

View Full Code Here

Examples of org.nutz.aop.asm.AsmClassAgent.addInterceptor()

    List<InterceptorPair> interceptorPairs = aopConfigration.getInterceptorPairList(ioc, type);
    if (interceptorPairs == null || interceptorPairs.size() < 1)
      return Mirror.me(type);
    ClassAgent agent = new AsmClassAgent();
    for (InterceptorPair interceptorPair : interceptorPairs)
      agent.addInterceptorinterceptorPair.getMethodMatcher(),
                  interceptorPair.getMethodInterceptor());
    return Mirror.me(agent.define(cd, type));
  }

  public void setAopConfigration(AopConfigration aopConfigration) {
View Full Code Here

Examples of org.springframework.integration.channel.DirectChannel.addInterceptor()

        org.springframework.integration.samples.websocket.standard.client.Application.class);
    DirectChannel webSocketInputChannel = ctx.getBean("webSocketInputChannel", DirectChannel.class);

    final CountDownLatch stopLatch = new CountDownLatch(2);

    webSocketInputChannel.addInterceptor(new ChannelInterceptorAdapter() {
      @Override
      public void postSend(Message<?> message, MessageChannel channel, boolean sent) {
        Object payload = message.getPayload();
        assertThat(payload, instanceOf(String.class));
        Date date = null;
View Full Code Here

Examples of org.springframework.messaging.support.ExecutorSubscribableChannel.addInterceptor()

  @Test
  public void handleMessageFromClientWithImmutableMessageInterceptor() {
    AtomicReference<Boolean> mutable = new AtomicReference<>();
    ExecutorSubscribableChannel channel = new ExecutorSubscribableChannel();
    channel.addInterceptor(new ChannelInterceptorAdapter() {
      @Override
      public Message<?> preSend(Message<?> message, MessageChannel channel) {
        mutable.set(MessageHeaderAccessor.getAccessor(message, MessageHeaderAccessor.class).isMutable());
        return message;
      }
View Full Code Here

Examples of org.springframework.social.connect.web.ConnectController.addInterceptor()

   * @param profilePictureService needed by the {@link FacebookConnectInterceptor} to make the user's Facebook profile picture their Greenhouse profile picture.
   */
  @Bean
  public ConnectController connectController(ProfilePictureService profilePictureService) {
    ConnectController controller = new ConnectController(connectionFactoryLocator(), connectionRepository());
    controller.addInterceptor(new FacebookConnectInterceptor(profilePictureService));
    controller.addInterceptor(new TwitterConnectInterceptor());
    return controller;
  }

  /**
 
View Full Code Here

Examples of org.springframework.social.popup.connect.SinglePageConnectController.addInterceptor()

  }
 
  @Bean
  public ConnectController connectController() {
    SinglePageConnectController connectController = new SinglePageConnectController(connectionFactoryLocator(), connectionRepository());
    connectController.addInterceptor(new PostToWallAfterConnectInterceptor());
    connectController.addInterceptor(new PopupDialogConnectInterceptor());
    connectController.addInterceptor(new TweetAfterConnectInterceptor());
    return connectController;
  }
View Full Code Here

Examples of org.springframework.web.servlet.HandlerExecutionChain.addInterceptor()

    if (rawHandler instanceof String) {
      String handlerName = (String) rawHandler;
      rawHandler = getApplicationContext().getBean(handlerName);
    }
    HandlerExecutionChain chain = new HandlerExecutionChain(rawHandler);
    chain.addInterceptor(new PathExposingHandlerInterceptor(pathWithinMapping));
    return chain;
  }

  /**
   * Expose the path within the current mapping as request attribute.
View Full Code Here

Examples of org.xlightweb.client.HttpClient.addInterceptor()

        HttpServer server = new HttpServer(reqHdl);
        server.start();
       
        HttpClient httpClient = new HttpClient();
        httpClient.setCacheMaxSizeKB(100);
        httpClient.addInterceptor(new CacheHandler(5666));
       
        IHttpResponse resp = httpClient.call(new GetRequest("http://localhost:" + server.getLocalPort() + "/"));
        Assert.assertEquals(200, resp.getStatus());
        Assert.assertEquals("test", resp.getBody().readString());
        Assert.assertNull(resp.getHeader(CacheHandler.XHEADER_NAME));
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.