org.eclipse.jetty.websocket.common.OpCode Java Examples
The following examples show how to use
org.eclipse.jetty.websocket.common.OpCode.
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: JettyWebSocketHandlerAdapter.java From spring-analysis-note with MIT License | 5 votes |
@OnWebSocketFrame public void onWebSocketFrame(Frame frame) { if (this.delegateSession != null) { if (OpCode.PONG == frame.getOpCode()) { ByteBuffer buffer = (frame.getPayload() != null ? frame.getPayload() : EMPTY_PAYLOAD); WebSocketMessage webSocketMessage = toMessage(Type.PONG, buffer); this.delegateSession.handleMessage(webSocketMessage.getType(), webSocketMessage); } } }
Example #2
Source File: JettyWebSocketHandlerAdapter.java From spring-analysis-note with MIT License | 5 votes |
@OnWebSocketFrame public void onWebSocketFrame(Frame frame) { if (OpCode.PONG == frame.getOpCode()) { ByteBuffer payload = frame.getPayload() != null ? frame.getPayload() : EMPTY_PAYLOAD; PongMessage message = new PongMessage(payload); try { this.webSocketHandler.handleMessage(this.wsSession, message); } catch (Throwable ex) { ExceptionWebSocketHandlerDecorator.tryCloseWithError(this.wsSession, ex, logger); } } }
Example #3
Source File: JettyWebSocketHandlerAdapter.java From java-technology-stack with MIT License | 5 votes |
@OnWebSocketFrame public void onWebSocketFrame(Frame frame) { if (this.delegateSession != null) { if (OpCode.PONG == frame.getOpCode()) { ByteBuffer buffer = (frame.getPayload() != null ? frame.getPayload() : EMPTY_PAYLOAD); WebSocketMessage webSocketMessage = toMessage(Type.PONG, buffer); this.delegateSession.handleMessage(webSocketMessage.getType(), webSocketMessage); } } }
Example #4
Source File: JettyWebSocketHandlerAdapter.java From java-technology-stack with MIT License | 5 votes |
@OnWebSocketFrame public void onWebSocketFrame(Frame frame) { if (OpCode.PONG == frame.getOpCode()) { ByteBuffer payload = frame.getPayload() != null ? frame.getPayload() : EMPTY_PAYLOAD; PongMessage message = new PongMessage(payload); try { this.webSocketHandler.handleMessage(this.wsSession, message); } catch (Throwable ex) { ExceptionWebSocketHandlerDecorator.tryCloseWithError(this.wsSession, ex, logger); } } }
Example #5
Source File: JettyWebSocketHandlerAdapter.java From spring4-understanding with Apache License 2.0 | 5 votes |
@OnWebSocketFrame public void onWebSocketFrame(Frame frame) { if (OpCode.PONG == frame.getOpCode()) { ByteBuffer payload = frame.getPayload() != null ? frame.getPayload() : EMPTY_PAYLOAD; PongMessage message = new PongMessage(payload); try { this.webSocketHandler.handleMessage(this.wsSession, message); } catch (Throwable ex) { ExceptionWebSocketHandlerDecorator.tryCloseWithError(this.wsSession, ex, logger); } } }