public class SessionEventListener extends Object
Constructor and Description |
---|
SessionEventListener(javax.websocket.Session session)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
onClose()
Invoked on session close event.
|
void |
onClose(javax.websocket.CloseReason closeReason)
Invoked on session close event.
|
void |
onSendBinary(byte[] message)
Invoked on send binary message event.
|
void |
onSendBinary(byte[] message,
boolean isLast)
Invoked on send partial binary message event.
|
void |
onSendPing(byte[] payload)
Invoked on send ping frame event.
|
void |
onSendPong(byte[] payload)
Invoked on send pong frame event.
|
void |
onSendText(String message)
Invoked on send text message event.
|
void |
onSendText(String message,
boolean isLast)
Invoked on send partial text message event.
|
public SessionEventListener(javax.websocket.Session session)
session
- session to be used for sending messages passed from other nodes.public void onSendText(String message) throws IOException
message
- message to be sent.IOException
- if there is a problem delivering the message.public void onSendText(String message, boolean isLast) throws IOException
message
- partial message to be sent.isLast
- true
when the partial message being sent is the last part of the message.IOException
public void onSendBinary(byte[] message) throws IOException
message
- data to be sent.IOException
- if there is a problem delivering the message.public void onSendBinary(byte[] message, boolean isLast) throws IOException
message
- data to be sent.isLast
- true
when the partial message being sent is the last part of the message.IOException
- if there is a problem delivering the message.public void onSendPing(byte[] payload) throws IOException
payload
- ping frame payload.IOException
- if there is a problem delivering the message.public void onSendPong(byte[] payload) throws IOException
payload
- pong frame payload.IOException
- if there is a problem delivering the message.public void onClose() throws IOException
IOException
- if there is a problem closing the session.public void onClose(javax.websocket.CloseReason closeReason) throws IOException
closeReason
- close reason of the session close event.IOException
- if there is a problem closing the session.Copyright © 2012-2015, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.