public class ServerBusyHandler
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private long |
timeOut
The time-out.
|
Constructor and Description |
---|
ServerBusyHandler()
Creates a server busy handler which waits for the server
to be free without any time-out.
|
ServerBusyHandler(long timeOut)
Creates a server busy handler which waits for the server to be
free.
|
Modifier and Type | Method and Description |
---|---|
long |
getTimeOut() |
void |
postWaitForServer(boolean serverStillBusy)
Hook to perform any action right after waiting for the server to
become free.
|
void |
preWaitForServer(java.lang.String hostName,
java.lang.String userName)
Hook to perform any action before beginning to wait for the server
to become free.
|
public ServerBusyHandler()
public ServerBusyHandler(long timeOut)
timeOut
- The amount of time to wait in milliseconds. If the server is still busy
after this amount of time, an exception is thrown.public final long getTimeOut()
public void preWaitForServer(java.lang.String hostName, java.lang.String userName)
hostName
- The host name of the client currently using the server.userName
- The name of the user currently using the server.public void postWaitForServer(boolean serverStillBusy)
serverStillBusy
- true
if the server is still busy,
false
is it is free.