Search in sources :

Example 11 with TaskScheduler

use of org.springframework.scheduling.TaskScheduler in project spring-framework by spring-projects.

the class WebMvcStompEndpointRegistryTests method setup.

@Before
public void setup() {
    SubscribableChannel inChannel = mock(SubscribableChannel.class);
    SubscribableChannel outChannel = mock(SubscribableChannel.class);
    this.webSocketHandler = new SubProtocolWebSocketHandler(inChannel, outChannel);
    WebSocketTransportRegistration transport = new WebSocketTransportRegistration();
    TaskScheduler scheduler = mock(TaskScheduler.class);
    this.endpointRegistry = new WebMvcStompEndpointRegistry(this.webSocketHandler, transport, scheduler);
}
Also used : SubProtocolWebSocketHandler(org.springframework.web.socket.messaging.SubProtocolWebSocketHandler) TaskScheduler(org.springframework.scheduling.TaskScheduler) SubscribableChannel(org.springframework.messaging.SubscribableChannel) Before(org.junit.Before)

Aggregations

TaskScheduler (org.springframework.scheduling.TaskScheduler)11 Test (org.junit.Test)10 ApplicationRegistrator (de.codecentric.boot.admin.client.registration.ApplicationRegistrator)6 RegistrationApplicationListener (de.codecentric.boot.admin.client.registration.RegistrationApplicationListener)6 ScheduledFuture (java.util.concurrent.ScheduledFuture)3 ApplicationReadyEvent (org.springframework.boot.context.event.ApplicationReadyEvent)3 ContextClosedEvent (org.springframework.context.event.ContextClosedEvent)3 SubProtocolWebSocketHandler (org.springframework.web.socket.messaging.SubProtocolWebSocketHandler)3 Date (java.util.Date)2 SubscribableChannel (org.springframework.messaging.SubscribableChannel)2 WebSocketServerSockJsSession (org.springframework.web.socket.sockjs.transport.session.WebSocketServerSockJsSession)2 AtomicReference (java.util.concurrent.atomic.AtomicReference)1 Before (org.junit.Before)1 Receiptable (org.springframework.messaging.simp.stomp.StompSession.Receiptable)1 WebSocketHandler (org.springframework.web.socket.WebSocketHandler)1 TextWebSocketHandler (org.springframework.web.socket.handler.TextWebSocketHandler)1 StompSubProtocolHandler (org.springframework.web.socket.messaging.StompSubProtocolHandler)1