Package org.medcare.igtl.network
Class RequestQueueManager
java.lang.Object
java.lang.Thread
org.medcare.igtl.network.RequestQueueManager
- All Implemented Interfaces:
Runnable
RequestQueueManager create its own OpenIGTClient connected to one
OpenIGTServer. Application add Messages request to RequestQueueManager queue.
OpenIGTClient will send Messages to its OpenIGTServer respecting the order.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler
-
Field Summary
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
Constructor Summary
ConstructorDescriptionRequestQueueManager
(OpenIGTClient openIGTClient) Default RequestQueueManager constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRequest
(byte[] request) add a new request to the request queuevoid
destroy()
stop the threadlong
** Gets the current sleep time value return@ The sleep time value** Gets the current version return@ The version valuevoid
run()
Starts the thread and process requests in queuevoid
setSleepTime
(long sleep) Sets the time the listener thread will wait between actionsMethods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, 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, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, suspend, threadId, toString, yield
-
Field Details
-
openIGT_Queue
-
-
Constructor Details
-
RequestQueueManager
Default RequestQueueManager constructor.- Parameters:
openIGTClient
- managing this connection
-
-
Method Details
-
run
public void run()Starts the thread and process requests in queue -
addRequest
public void addRequest(byte[] request) add a new request to the request queue- Parameters:
request
-
-
destroy
public void destroy()stop the thread -
getSleepTime
public long getSleepTime()** Gets the current sleep time value return@ The sleep time value -
setSleepTime
public void setSleepTime(long sleep) Sets the time the listener thread will wait between actions- Parameters:
sleep
-
-
getVersion
** Gets the current version return@ The version value
-