public interface IClient extends IRecordingComponent
IRecorder
. A client can be started
,
stopped
, and killed
. Its nature and behavior are parameterized
by its client configuration
. It may be bound to zero or more
recorders
, which can set it up in a way that allow them to capture the
traffic initiated by the client. A client belongs to a recording session
, and
has a state
. It can be observed by listeners
.Modifier and Type | Method and Description |
---|---|
void |
addListener(IClientListener listener) |
ClientConfiguration |
getClientConfiguration() |
List<IRecorder> |
getRecorders() |
ClientState |
getState()
Returns the current state of the client.
|
void |
kill()
Asks the client to stop immediately, allowing it to lose data if necessary.
|
void |
removeListener(IClientListener listener) |
void |
start()
Starts the client.
|
void |
stop()
Asks the client to stop.
|
getName, getProperty, getSession, getType, sendMessage, setProperty
void start()
void stop()
void kill()
IClient.stop()
, and then invoke
IClient.kill()
only if the client does respond to the stop request whereas there
is no legitimate reason for it not to stop.ClientConfiguration getClientConfiguration()
void addListener(IClientListener listener)
void removeListener(IClientListener listener)
ClientState getState()
synchronized(client) { if (client.getState() == ClientState.RUNNING) { client.stop(); // This method may throw an IllegalStateException // if invoked while the client is in STOPPING state } }
© Copyright IBM Corp. 2013. All rights reserved.