public interface FrameListener
FrameListener
is used to listen for incoming frames
on a WebSocket
. Any number of listeners can listen on
a single web socket and it will receive all incoming events. For
consistency this interface is modelled on the WebSocket API as
defined by W3C Candidate Recommendation as of 20 September 2012.FrameChannel
Modifier and Type | Method and Description |
---|---|
void |
onClose(Session session,
Reason reason)
This is called when the connection is closed from the other
side.
|
void |
onError(Session session,
Exception cause)
This is called when an error occurs on the WebSocket.
|
void |
onFrame(Session session,
Frame frame)
This is called when a new frame arrives on the WebSocket.
|
void onFrame(Session session, Frame frame)
session
- this is the associated sessionframe
- this is the frame that has been receivedvoid onError(Session session, Exception cause)
session
- this is the associated sessionframe
- this is the exception that has been thrownvoid onClose(Session session, Reason reason)
session
- this is the associated sessionreason
- this is the reason the connection was closedCopyright © 2016. All rights reserved.