public class ClientConnectionClosedEvent extends ClientConnectionEndedEvent
Client
has had a working connection cease.DEFAULT_RECONNECTION_DELAY_MILLIS
Constructor and Description |
---|
ClientConnectionClosedEvent(@NonNull Client client,
boolean reconnecting,
@Nullable Throwable cause,
@Nullable String lastMessage)
Constructs the event.
|
Modifier and Type | Method and Description |
---|---|
@NonNull Optional<String> |
getLastMessage()
Gets the last message sent prior to disconnect.
|
protected @NonNull ToStringer |
toStringer()
Generates a partial
ToStringer for the command. |
canAttemptReconnect, getCause, getReconnectionDelay, setAttemptReconnect, setReconnectionDelay, willAttemptReconnect
getClient, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getClient
public ClientConnectionClosedEvent(@NonNull Client client, boolean reconnecting, @Nullable Throwable cause, @Nullable String lastMessage)
client
- client for which this is occurringreconnecting
- true if the client plans to reconnectcause
- cause, if there was one, closing itlastMessage
- last message receivedpublic @NonNull Optional<String> getLastMessage()
protected @NonNull ToStringer toStringer()
ClientEventBase
ToStringer
for the command.toStringer
in class ClientConnectionEndedEvent
Copyright © 2013–2021 Kitteh. All rights reserved.