Class ConnectionDelegator
java.lang.Object
java.lang.Thread
org.jrd.agent.ConnectionDelegator
- All Implemented Interfaces:
Runnable
-
Nested Class Summary
Nested classes/interfaces inherited from class Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static ConnectionDelegatorstatic final Stringstatic final intprivate InstrumentationProviderprivate static booleanprivate ServerSocketFields inherited from class Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateConnectionDelegator(InstrumentationProvider provider, ServerSocket serverSocket) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidCloses server socket Already connected clients can finish their work but no new clients can connect.static voidinitialize(String hostname, Integer port, InstrumentationProvider provider, String loneliness) This method is used to create an ConnectionDelegator object and start listener threadvoidrun()Waits for new connection.private static voidsetRunning(boolean isRunning) Methods inherited from class Thread
activeCount, checkAccess, clone, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, threadId, toString, yield
-
Field Details
-
connectionDelegator
-
DEFAULT_PORT
public static final int DEFAULT_PORT- See Also:
-
DEFAULT_ADDRESS
- See Also:
-
theServerSocket
-
provider
-
running
private static boolean running
-
-
Constructor Details
-
ConnectionDelegator
-
-
Method Details
-
initialize
public static void initialize(String hostname, Integer port, InstrumentationProvider provider, String loneliness) throws IOException This method is used to create an ConnectionDelegator object and start listener thread- Parameters:
hostname- host name to open communication withport- on which open socketprovider- this is where instrumentation and transformer objects are stored- Throws:
IOException
-
run
-
setRunning
private static void setRunning(boolean isRunning) -
gracefulShutdown
public static void gracefulShutdown()Closes server socket Already connected clients can finish their work but no new clients can connect.
-