Modifier and Type | Field and Description |
---|---|
protected String |
clientID |
protected Log |
log |
Constructor and Description |
---|
AbstractClient(String clientID) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close client
|
void |
connect()
Connect the client
|
void |
destroy()
Destroys clients.
|
protected abstract void |
doClose() |
protected abstract void |
doConnect() |
protected abstract void |
doDestroy() |
protected abstract void |
doInit() |
ClientState |
getClientState()
Gets client state.
|
protected ClientStateListener |
getClientStateListener() |
protected EventListener |
getEventListener() |
void |
init()
Inits the client.
|
protected void |
setClientState(ClientState clientState) |
void |
setClientStateListener(ClientStateListener clientStateListener)
Sets state listener.
|
void |
setEventListener(EventListener eventListener)
Sets event listener.
|
public AbstractClient(String clientID)
public void setEventListener(EventListener eventListener)
Client
setEventListener
in interface Client
eventListener
- the event listenerpublic void setClientStateListener(ClientStateListener clientStateListener)
Client
setClientStateListener
in interface Client
clientStateListener
- the client state listenerprotected ClientStateListener getClientStateListener()
protected EventListener getEventListener()
public ClientState getClientState()
Client
getClientState
in interface Client
protected void setClientState(ClientState clientState)
public void init()
Client
protected abstract void doInit()
public void connect()
Client
protected abstract void doConnect()
public void close()
Client
protected abstract void doClose()
public void destroy()
Client
protected abstract void doDestroy()
Copyright © 2000–2022 EPAM Systems. All rights reserved.