|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.TimerTask
org.jboss.remoting.ConnectionValidator
public class ConnectionValidator
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_NUMBER_OF_PING_RETRIES
Default number of ping retries. |
static long |
DEFAULT_PING_PERIOD
Default ping period. |
static java.lang.String |
DEFAULT_PING_TIMEOUT
Default ping timeout period. |
static java.lang.String |
STOP_LEASE_ON_FAILURE
Key to determine whether to stop ConnectionValidator when PING fails. |
static java.lang.String |
TIE_TO_LEASE
Key to determine if ConnectionValidator should tie failure to presence of active lease on server side. |
static java.lang.String |
VALIDATOR_PING_PERIOD
Configuration map key for ping period. |
static java.lang.String |
VALIDATOR_PING_TIMEOUT
Configuration map key for ping timeout. |
Constructor Summary | |
---|---|
ConnectionValidator(Client client)
|
|
ConnectionValidator(Client client,
long pingPeriod)
|
|
ConnectionValidator(Client client,
java.util.Map metadata)
|
Method Summary | |
---|---|
void |
addConnectionListener(ConnectionListener listener)
|
boolean |
cancel()
|
static boolean |
checkConnection(InvokerLocator locator,
java.util.Map config)
Will make $PING$ invocation on server. |
long |
getPingPeriod()
|
boolean |
removeConnectionListener(ConnectionListener listener)
|
void |
run()
The action to be performed by this timer task. |
void |
stop()
stop() will be called when TimerUtil.unschedule() or when TimerUtil.destroy() are called. |
java.lang.String |
toString()
|
Methods inherited from class java.util.TimerTask |
---|
scheduledExecutionTime |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String VALIDATOR_PING_PERIOD
public static final long DEFAULT_PING_PERIOD
public static final java.lang.String VALIDATOR_PING_TIMEOUT
public static final java.lang.String DEFAULT_PING_TIMEOUT
public static final java.lang.String DEFAULT_NUMBER_OF_PING_RETRIES
public static final java.lang.String TIE_TO_LEASE
public static final java.lang.String STOP_LEASE_ON_FAILURE
Constructor Detail |
---|
public ConnectionValidator(Client client)
public ConnectionValidator(Client client, long pingPeriod)
public ConnectionValidator(Client client, java.util.Map metadata)
Method Detail |
---|
public static boolean checkConnection(InvokerLocator locator, java.util.Map config) throws java.lang.Throwable
locator
- - locator for the server to pingconfig
- - any configuration needed for server
java.lang.Throwable
public void stop()
StoppableTimerTask
stop
in interface StoppableTimerTask
public void run()
run
in interface java.lang.Runnable
run
in class java.util.TimerTask
public boolean cancel()
cancel
in class java.util.TimerTask
public void addConnectionListener(ConnectionListener listener)
public boolean removeConnectionListener(ConnectionListener listener)
public long getPingPeriod()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |