本文整理汇总了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);
}
示例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;
}
示例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