Package org.glassfish.tyrus.core.cluster
Class SessionEventListener
- java.lang.Object
-
- org.glassfish.tyrus.core.cluster.SessionEventListener
-
public class SessionEventListener extends java.lang.ObjectSession 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 voidonClose()Invoked on session close event.voidonClose(CloseReason closeReason)Invoked on session close event.voidonSendBinary(byte[] message)Invoked on send binary message event.voidonSendBinary(byte[] message, boolean isLast)Invoked on send partial binary message event.voidonSendPing(byte[] payload)Invoked on send ping frame event.voidonSendPong(byte[] payload)Invoked on send pong frame event.voidonSendText(java.lang.String message)Invoked on send text message event.voidonSendText(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.IOExceptionInvoked 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.IOExceptionInvoked on send partial text message event.- Parameters:
message- partial message to be sent.isLast-truewhen 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.IOExceptionInvoked 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.IOExceptionInvoked on send partial binary message event.- Parameters:
message- data to be sent.isLast-truewhen 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.IOExceptionInvoked 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.IOExceptionInvoked 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.IOExceptionInvoked 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.
-
-