Package org.glassfish.tyrus.core.cluster
Class SessionEventListener
- java.lang.Object
-
- org.glassfish.tyrus.core.cluster.SessionEventListener
-
public class SessionEventListener extends java.lang.Object
Session event listener.- Author:
- Pavel Bucek
-
-
Constructor Summary
Constructors Constructor Description SessionEventListener(Session session)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Constructor Detail
-
SessionEventListener
public SessionEventListener(Session session)
Constructor.- Parameters:
session
- session to be used for sending messages passed from other nodes.
-
-
Method Detail
-
onSendText
public void onSendText(java.lang.String message) throws java.io.IOException
Invoked on send text message event.- Parameters:
message
- message to be sent.- Throws:
java.io.IOException
- if there is a problem delivering the message.
-
onSendText
public void onSendText(java.lang.String message, boolean isLast) throws java.io.IOException
Invoked on send partial text message event.- Parameters:
message
- partial message to be sent.isLast
-true
when the partial message being sent is the last part of the message.- Throws:
java.io.IOException
- if there is a problem delivering the message.
-
onSendBinary
public void onSendBinary(byte[] message) throws java.io.IOException
Invoked on send binary message event.- Parameters:
message
- data to be sent.- Throws:
java.io.IOException
- if there is a problem delivering the message.
-
onSendBinary
public void onSendBinary(byte[] message, boolean isLast) throws java.io.IOException
Invoked on send partial binary message event.- Parameters:
message
- data to be sent.isLast
-true
when the partial message being sent is the last part of the message.- Throws:
java.io.IOException
- if there is a problem delivering the message.
-
onSendPing
public void onSendPing(byte[] payload) throws java.io.IOException
Invoked on send ping frame event.- Parameters:
payload
- ping frame payload.- Throws:
java.io.IOException
- if there is a problem delivering the message.
-
onSendPong
public void onSendPong(byte[] payload) throws java.io.IOException
Invoked on send pong frame event.- Parameters:
payload
- pong frame payload.- Throws:
java.io.IOException
- if there is a problem delivering the message.
-
onClose
public void onClose() throws java.io.IOException
Invoked on session close event.- Throws:
java.io.IOException
- if there is a problem closing the session.
-
onClose
public void onClose(CloseReason closeReason) throws java.io.IOException
Invoked on session close event.- Parameters:
closeReason
- close reason of the session close event.- Throws:
java.io.IOException
- if there is a problem closing the session.
-
-