public class FakeVizConnectionListener extends java.lang.Object implements IVizConnectionListener<FakeClient>
VizConnection
.Constructor and Description |
---|
FakeVizConnectionListener() |
Modifier and Type | Method and Description |
---|---|
void |
connectionStateChanged(IVizConnection<FakeClient> connection,
ConnectionState state,
java.lang.String message)
Notifies the listener that the connection's state has changed.
|
void |
reset()
Resets the flag that indicates this listener was notified.
|
boolean |
wasNotified()
Determines if the listener was notified of a connection state change
since the last call to this method.
|
boolean |
wasNotified(int expectedCount)
Determines if the listener was notified of a connection state change a
certain number of times.
|
public void connectionStateChanged(IVizConnection<FakeClient> connection, ConnectionState state, java.lang.String message)
IVizConnectionListener
connectionStateChanged
in interface IVizConnectionListener<FakeClient>
connection
- The connection whose state changed.state
- The new state of the connection.message
- A descriptive message to go along with the state change. This
is particularly useful if the connection failed.public boolean wasNotified()
This will wait for a certain amount of time until either the flag is true or a timeout occurs.
public boolean wasNotified(int expectedCount)
This will wait for a certain amount of time until either the count is reached or a timeout occurs.
expectedCount
- The number of times the listener is expected to be updated.public void reset()