Package org.springframework.messaging.support

Examples of org.springframework.messaging.support.ChannelInterceptorAdapter


        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


  @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

  @Test
  public void handleMessageFromClientWithoutImmutableMessageInterceptor() {
    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

TOP

Related Classes of org.springframework.messaging.support.ChannelInterceptorAdapter

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.