public final class ConnectionEvent
extends java.util.EventObject
This event is fired for the following use cases:
Modifier and Type | Class and Description |
---|---|
static class |
ConnectionEvent.Type
The connection event type.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Throwable |
getCause()
Gets the cause of the disconnection or reconnection failure.
|
java.time.Duration |
getNextReconnectionAttempt()
Gets the duration until the next reconnection is attempted.
|
ConnectionEvent.Type |
getType()
Gets the event type.
|
java.lang.String |
toString() |
public final java.lang.Throwable getCause()
Gets the cause of the disconnection or reconnection failure. Returns null for the ConnectionEvent.Type.RECONNECTION_SUCCEEDED
type.
public final java.time.Duration getNextReconnectionAttempt()
Gets the duration until the next reconnection is attempted. This method should only be used in conjunction with the type ConnectionEvent.Type.RECONNECTION_PENDING
. Otherwise Duration.ZERO
is returned.
public final ConnectionEvent.Type getType()
Gets the event type.
public final java.lang.String toString()
toString
in class java.util.EventObject
Copyright © 2014–2019 XMPP.rocks. All rights reserved.