public interface Connectable extends ConnectedTestable
| Modifier and Type | Method and Description |
|---|---|
boolean |
connect()
Try to connect this object.
|
default boolean |
connect(long timeoutInSeconds,
long tryIntervalInSeconds)
Try to connect this object.
|
default void |
ensureConnected(long timeoutInSeconds,
long tryIntervalInSeconds)
Ensure that this object is connected.
|
isConnectedboolean connect()
throws NotConnectedException
NotConnectedException - in case of errordefault boolean connect(long timeoutInSeconds,
long tryIntervalInSeconds)
throws NotConnectedException
timeoutInSeconds - The duration until timeout in seconds. A negative or zero value means a one-time trytryIntervalInSeconds - The time interval between two subsequent tries in seconds. Only relevant if the value
of timeoutInSeconds is positive.NotConnectedException - in case of errordefault void ensureConnected(long timeoutInSeconds,
long tryIntervalInSeconds)
throws NotConnectedException
timeoutInSeconds - The duration until timeout in seconds. A negative or zero value means a one-time trytryIntervalInSeconds - The time interval between two subsequent tries in seconds. Only relevant if the value
of timeoutInSeconds is positive.NotConnectedException - if the timeout is elapsed and still not connected or in case of errorCopyright © 2019. All rights reserved.