public class SessionEventListener
extends java.lang.Object
| Constructor and Description |
|---|
SessionEventListener(Session session)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
onClose()
Invoked on session close event.
|
void |
onClose(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(java.lang.String message)
Invoked on send text message event.
|
void |
onSendText(java.lang.String message,
boolean isLast)
Invoked on send partial text message event.
|
public SessionEventListener(Session session)
session - session to be used for sending messages passed from other nodes.public void onSendText(java.lang.String message)
throws java.io.IOException
message - message to be sent.java.io.IOException - if there is a problem delivering the message.public void onSendText(java.lang.String message,
boolean isLast)
throws java.io.IOException
message - partial message to be sent.isLast - true when the partial message being sent is the last part of the message.java.io.IOException - if there is a problem delivering the message.public void onSendBinary(byte[] message)
throws java.io.IOException
message - data to be sent.java.io.IOException - if there is a problem delivering the message.public void onSendBinary(byte[] message,
boolean isLast)
throws java.io.IOException
message - data to be sent.isLast - true when the partial message being sent is the last part of the message.java.io.IOException - if there is a problem delivering the message.public void onSendPing(byte[] payload)
throws java.io.IOException
payload - ping frame payload.java.io.IOException - if there is a problem delivering the message.public void onSendPong(byte[] payload)
throws java.io.IOException
payload - pong frame payload.java.io.IOException - if there is a problem delivering the message.public void onClose()
throws java.io.IOException
java.io.IOException - if there is a problem closing the session.public void onClose(CloseReason closeReason) throws java.io.IOException
closeReason - close reason of the session close event.java.io.IOException - if there is a problem closing the session.Copyright © 2012–2020 Oracle Corporation. All rights reserved.