Top Description Fields Constructors Methods
org.springframework.web.socket.adapter.jetty

public Class JettyWebSocketHandlerAdapter

extends Object
Class Inheritance
Annotations
@WebSocket
Imports
java.nio.ByteBuffer, org.apache.commons.logging.Log, .LogFactory, org.eclipse.jetty.websocket.api.Callback, .Frame, .Session, org.eclipse.jetty.websocket.api.annotations.OnWebSocketClose, .OnWebSocketError, .OnWebSocketFrame, .OnWebSocketMessage, .OnWebSocketOpen, .WebSocket, org.eclipse.jetty.websocket.core.OpCode, org.springframework.util.Assert, org.springframework.web.socket.BinaryMessage, .CloseStatus, .PongMessage, .TextMessage, .WebSocketHandler, org.springframework.web.socket.handler.ExceptionWebSocketHandlerDecorator

Adapts WebSocketHandler to the Jetty WebSocket API.
Author
Rossen Stoyanchev
Since
4.0

Field Summary

Modifier and TypeField and Description
private static final ByteBuffer
private static final Log
private final WebSocketHandler
private final JettyWebSocketSession

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static ByteBuffer
public void
public void
onWebSocketClose(int statusCode, String reason)

public void
public void
onWebSocketFrame(Frame frame, Callback callback)

public void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

EMPTY_PAYLOADback to summary
private static final ByteBuffer EMPTY_PAYLOAD
loggerback to summary
private static final Log logger
webSocketHandlerback to summary
private final WebSocketHandler webSocketHandler
wsSessionback to summary
private final JettyWebSocketSession wsSession

Constructor Detail

JettyWebSocketHandlerAdapterback to summary
public JettyWebSocketHandlerAdapter(WebSocketHandler webSocketHandler, JettyWebSocketSession wsSession)

Method Detail

copyByteBufferback to summary
private static ByteBuffer copyByteBuffer(ByteBuffer src)
onWebSocketBinaryback to summary
public void onWebSocketBinary(ByteBuffer payload, Callback callback)
Annotations
@OnWebSocketMessage
onWebSocketCloseback to summary
public void onWebSocketClose(int statusCode, String reason)
Annotations
@OnWebSocketClose
onWebSocketErrorback to summary
public void onWebSocketError(Throwable cause)
Annotations
@OnWebSocketError
onWebSocketFrameback to summary
public void onWebSocketFrame(Frame frame, Callback callback)
Annotations
@OnWebSocketFrame
onWebSocketOpenback to summary
public void onWebSocketOpen(Session session)
Annotations
@OnWebSocketOpen
onWebSocketTextback to summary
public void onWebSocketText(String payload)
Annotations
@OnWebSocketMessage