|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
osnap.api.net.CoreReconnecter
public class CoreReconnecter
A class designed to try reconnecting to Core in case of a lost connection. Reconnecting will continue in intervals of 30 seconds in case of failure.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
private java.net.Socket |
_coreSocket
|
private java.lang.String |
_hostname
|
private ModuleInterface |
_module
|
private int |
_port
|
private java.net.Socket |
_reconnectSocket
|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
CoreReconnecter(java.net.Socket socket,
ModuleInterface module)
Constructor for creating this object. |
|
CoreReconnecter(java.lang.String hostname,
int port,
ModuleInterface module)
Constructor for creating this object. |
Method Summary | |
---|---|
void |
run()
Tries to reconnect in intervals of 30 seconds. |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private java.net.Socket _coreSocket
private java.net.Socket _reconnectSocket
private ModuleInterface _module
private java.lang.String _hostname
private int _port
Constructor Detail |
---|
public CoreReconnecter(java.net.Socket socket, ModuleInterface module)
socket
- Socket to reconnect withmodule
- ModuleInterface
trying to reconnectpublic CoreReconnecter(java.lang.String hostname, int port, ModuleInterface module)
hostname
- Hostname of Coreport
- Port of Coremodule
- ModuleInterface
trying to reconnectMethod Detail |
---|
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |