public class DisconnectedEvent extends Object implements SessionEvent
| Constructor and Description |
|---|
DisconnectedEvent(Session session,
String reason)
Creates a new DisconnectedEvent instance.
|
DisconnectedEvent(Session session,
String reason,
Throwable cause)
Creates a new DisconnectedEvent instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
call(SessionListener listener)
Calls the event.
|
Throwable |
getCause()
Gets the Throwable responsible for the session disconnecting.
|
String |
getReason()
Gets the reason given for the session disconnecting.
|
Session |
getSession()
Gets the session involved in this event.
|
public DisconnectedEvent(Session session, String reason)
session - Session being disconnected.reason - Reason for the session to disconnect.public Session getSession()
public String getReason()
public Throwable getCause()
public void call(SessionListener listener)
SessionEventcall in interface SessionEventlistener - Listener to call the event on.Copyright © 2022. All rights reserved.