Class WebSocketSessionState
java.lang.Object
org.eclipse.jetty.websocket.core.internal.WebSocketSessionState
Atomic Connection State
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isClosed()
boolean
boolean
boolean
onClosed
(CloseStatus closeStatus) void
boolean
onEof()
void
If no error is set in the CloseStatus this will either, replace the current close status with aCloseStatus.SERVER_ERROR
status if we had a NORMAL close code, or, it will set the cause of the CloseStatus if the previous cause was null, this allows onError to be notified after the connection is closed.boolean
onIncomingFrame
(Frame frame) void
onOpen()
boolean
onOutgoingFrame
(Frame frame) toString()
-
Constructor Details
-
WebSocketSessionState
public WebSocketSessionState()
-
-
Method Details
-
onConnected
public void onConnected() -
onOpen
public void onOpen() -
isClosed
public boolean isClosed() -
isInputOpen
public boolean isInputOpen() -
isOutputOpen
public boolean isOutputOpen() -
getCloseStatus
-
onClosed
-
onError
If no error is set in the CloseStatus this will either, replace the current close status with a
CloseStatus.SERVER_ERROR
status if we had a NORMAL close code, or, it will set the cause of the CloseStatus if the previous cause was null, this allows onError to be notified after the connection is closed.This should only be called if there is an error directly before the call to
WebSocketCoreSession.closeConnection(CloseStatus, Callback)
.This could occur if the FrameHandler throws an exception in onFrame after receiving a close frame reply, in this case to notify onError we must set the cause in the closeStatus.
- Parameters:
t
- the error which occurred.
-
onEof
public boolean onEof() -
onOutgoingFrame
- Throws:
Exception
-
onIncomingFrame
-
toString
-