Class WebSocketClientConnectionHandler
- java.lang.Object
-
- org.jivesoftware.openfire.websocket.WebSocketClientConnectionHandler
-
@WebSocket public class WebSocketClientConnectionHandler extends Object
This class handles all WebSocket events for the corresponding connection with a remote peer, analogous to the function ofNettyClientConnectionHandler
for TCP connections. Specifically the XMPP session is managed concurrently with the WebSocket session, including all framing and authentication requirements. Packets received from the remote peer are forwarded as needed via aSessionPacketRouter
, and packets destined for the remote peer are forwarded via the correspondingRemoteEndpoint
.
-
-
Field Summary
Fields Modifier and Type Field Description static SystemProperty<Boolean>
KEEP_ALIVE_FRAME_PING_ENABLED_PROPERTY
static SystemProperty<Duration>
KEEP_ALIVE_FRAME_PING_INTERVAL_PROPERTY
static SystemProperty<Boolean>
STREAM_SUBSTITUTION_ENABLED
Controls if clients that do websockets without the required XMPP framing will get their 'stream' element names replaced, so that they are able to connect.
-
Constructor Summary
Constructors Constructor Description WebSocketClientConnectionHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Duration
getMaxIdleTime()
Returns the max duration that a connection can be idle before being closed.void
onClose(int statusCode, String reason)
void
onConnect(org.eclipse.jetty.websocket.api.Session session)
void
onError(Throwable error)
void
onTextMethod(String stanza)
-
-
-
Field Detail
-
STREAM_SUBSTITUTION_ENABLED
public static final SystemProperty<Boolean> STREAM_SUBSTITUTION_ENABLED
Controls if clients that do websockets without the required XMPP framing will get their 'stream' element names replaced, so that they are able to connect.
-
KEEP_ALIVE_FRAME_PING_ENABLED_PROPERTY
public static final SystemProperty<Boolean> KEEP_ALIVE_FRAME_PING_ENABLED_PROPERTY
-
KEEP_ALIVE_FRAME_PING_INTERVAL_PROPERTY
public static final SystemProperty<Duration> KEEP_ALIVE_FRAME_PING_INTERVAL_PROPERTY
-
-
Method Detail
-
onConnect
@OnWebSocketConnect public void onConnect(org.eclipse.jetty.websocket.api.Session session)
-
onClose
@OnWebSocketClose public void onClose(int statusCode, String reason)
-
onTextMethod
@OnWebSocketMessage public void onTextMethod(String stanza)
-
onError
@OnWebSocketError public void onError(Throwable error)
-
getMaxIdleTime
public Duration getMaxIdleTime()
Returns the max duration that a connection can be idle before being closed.- Returns:
- the max duration that a connection can be idle.
-
-