当前位置: 首页>>代码示例>>Java>>正文


Java StompFrameHandler类代码示例

本文整理汇总了Java中org.springframework.messaging.simp.stomp.StompFrameHandler的典型用法代码示例。如果您正苦于以下问题:Java StompFrameHandler类的具体用法?Java StompFrameHandler怎么用?Java StompFrameHandler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


StompFrameHandler类属于org.springframework.messaging.simp.stomp包,在下文中一共展示了StompFrameHandler类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: pointToPointModel

import org.springframework.messaging.simp.stomp.StompFrameHandler; //导入依赖的package包/类
@Test
public void pointToPointModel() throws InterruptedException {
    //given
    final CountDownLatch countDownLatch = new CountDownLatch(1);
    StompFrameHandler mockedHandler = Mockito.mock(StompFrameHandler.class);
    //when

    new PersonWebSocketClient(restTemplate).connect(port, credentials, new Subscription("/user/queue/ws-auth", mockedHandler));

    new PersonWebSocketClient(restTemplate).connect(port, credentials, new Connection(
            new Subscription("/user/queue/ws-auth", new SynchronizationHandler<>(new PersonHandler(), countDownLatch)),
            stompSession -> stompSession.send("/app/ws-auth", null)
    ));

    //then
    Assert.assertTrue(countDownLatch.await(5, TimeUnit.SECONDS));
    verifyZeroInteractions(mockedHandler);
}
 
开发者ID:borysfan,项目名称:websocket-poc,代码行数:19,代码来源:PersonStompCommunicationIntegrationTest.java

示例2: subscribe

import org.springframework.messaging.simp.stomp.StompFrameHandler; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public Subscription subscribe(String destination, StompFrameHandler handler) {
    return delegate.subscribe(destination, new PreservesHeadersStompFrameHandlerAdapter(handler, getFilter()));
}
 
开发者ID:enadim,项目名称:spring-cloud-ribbon-extensions,代码行数:8,代码来源:PreservesHeadersStompSessionAdapter.java

示例3: Subscription

import org.springframework.messaging.simp.stomp.StompFrameHandler; //导入依赖的package包/类
public Subscription(String destination, StompFrameHandler handler) {
    this.destination = destination;
    this.handler = handler;
}
 
开发者ID:borysfan,项目名称:websocket-poc,代码行数:5,代码来源:Subscription.java

示例4: PreservesHeadersStompFrameHandlerAdapter

import org.springframework.messaging.simp.stomp.StompFrameHandler; //导入依赖的package包/类
/**
 * Sole constructor.
 *
 * @param delegate the delegate {@link StompFrameHandler}
 * @param filter   the stomp header names filter.
 */
public PreservesHeadersStompFrameHandlerAdapter(@NotNull StompFrameHandler delegate, @NotNull Filter<String> filter) {
    this.delegate = delegate;
    this.filter = filter;
}
 
开发者ID:enadim,项目名称:spring-cloud-ribbon-extensions,代码行数:11,代码来源:PreservesHeadersStompFrameHandlerAdapter.java


注:本文中的org.springframework.messaging.simp.stomp.StompFrameHandler类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。