org.springframework.messaging.simp.stomp.ConnectionHandlingStompSession Java Examples
The following examples show how to use
org.springframework.messaging.simp.stomp.ConnectionHandlingStompSession.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: WebSocketStompClientTests.java From spring-analysis-note with MIT License | 5 votes |
@Override protected ConnectionHandlingStompSession createSession(StompHeaders headers, StompSessionHandler handler) { return this.stompSession; }
Example #2
Source File: WebSocketStompClient.java From java-technology-stack with MIT License | 5 votes |
/** * An overloaded version of * {@link #connect(String, WebSocketHttpHeaders, StompSessionHandler, Object...)} * that accepts a fully prepared {@link java.net.URI}. * @param url the url to connect to * @param handshakeHeaders the headers for the WebSocket handshake * @param connectHeaders headers for the STOMP CONNECT frame * @param sessionHandler the STOMP session handler * @return a ListenableFuture for access to the session when ready for use */ public ListenableFuture<StompSession> connect(URI url, @Nullable WebSocketHttpHeaders handshakeHeaders, @Nullable StompHeaders connectHeaders, StompSessionHandler sessionHandler) { Assert.notNull(url, "'url' must not be null"); ConnectionHandlingStompSession session = createSession(connectHeaders, sessionHandler); WebSocketTcpConnectionHandlerAdapter adapter = new WebSocketTcpConnectionHandlerAdapter(session); getWebSocketClient().doHandshake(adapter, handshakeHeaders, url).addCallback(adapter); return session.getSessionFuture(); }
Example #3
Source File: WebSocketStompClientTests.java From spring-analysis-note with MIT License | 4 votes |
public void setStompSession(ConnectionHandlingStompSession stompSession) { this.stompSession = stompSession; }
Example #4
Source File: WebSocketStompClientTests.java From java-technology-stack with MIT License | 4 votes |
public void setStompSession(ConnectionHandlingStompSession stompSession) { this.stompSession = stompSession; }
Example #5
Source File: WebSocketStompClientTests.java From java-technology-stack with MIT License | 4 votes |
@Override protected ConnectionHandlingStompSession createSession(StompHeaders headers, StompSessionHandler handler) { return this.stompSession; }
Example #6
Source File: WebSocketStompClientTests.java From spring4-understanding with Apache License 2.0 | 4 votes |
public void setStompSession(ConnectionHandlingStompSession stompSession) { this.stompSession = stompSession; }
Example #7
Source File: WebSocketStompClientTests.java From spring4-understanding with Apache License 2.0 | 4 votes |
@Override protected ConnectionHandlingStompSession createSession(StompHeaders headers, StompSessionHandler handler) { return this.stompSession; }
Example #8
Source File: WebSocketStompClient.java From spring-analysis-note with MIT License | 3 votes |
/** * An overloaded version of * {@link #connect(String, WebSocketHttpHeaders, StompSessionHandler, Object...)} * that accepts a fully prepared {@link java.net.URI}. * @param url the url to connect to * @param handshakeHeaders the headers for the WebSocket handshake * @param connectHeaders headers for the STOMP CONNECT frame * @param sessionHandler the STOMP session handler * @return a ListenableFuture for access to the session when ready for use */ public ListenableFuture<StompSession> connect(URI url, @Nullable WebSocketHttpHeaders handshakeHeaders, @Nullable StompHeaders connectHeaders, StompSessionHandler sessionHandler) { Assert.notNull(url, "'url' must not be null"); ConnectionHandlingStompSession session = createSession(connectHeaders, sessionHandler); WebSocketTcpConnectionHandlerAdapter adapter = new WebSocketTcpConnectionHandlerAdapter(session); getWebSocketClient().doHandshake(adapter, handshakeHeaders, url).addCallback(adapter); return session.getSessionFuture(); }
Example #9
Source File: WebSocketStompClient.java From spring4-understanding with Apache License 2.0 | 3 votes |
/** * An overloaded version of * {@link #connect(String, WebSocketHttpHeaders, StompSessionHandler, Object...)} * that accepts a fully prepared {@link java.net.URI}. * @param url the url to connect to * @param handshakeHeaders the headers for the WebSocket handshake * @param connectHeaders headers for the STOMP CONNECT frame * @param sessionHandler the STOMP session handler * @return ListenableFuture for access to the session when ready for use */ public ListenableFuture<StompSession> connect(URI url, WebSocketHttpHeaders handshakeHeaders, StompHeaders connectHeaders, StompSessionHandler sessionHandler) { Assert.notNull(url, "'uri' must not be null"); ConnectionHandlingStompSession session = createSession(connectHeaders, sessionHandler); WebSocketTcpConnectionHandlerAdapter adapter = new WebSocketTcpConnectionHandlerAdapter(session); getWebSocketClient().doHandshake(adapter, handshakeHeaders, url).addCallback(adapter); return session.getSessionFuture(); }