Class ResponseWorker
java.lang.Object
java.lang.Thread
org.ovirt.vdsm.jsonrpc.client.internal.ResponseWorker
- All Implemented Interfaces:
Runnable
ResponseWorker is responsible to process responses for all the JsonRpcClient and it is produced
by ReactorFactory.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classNested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Loggerprivate static final com.fasterxml.jackson.databind.ObjectMapperprivate final EventPublisherprivate final LinkedBlockingQueue<MessageContext> private static final Patternprivate final ResponseTrackerFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()private voidprocessIncomingObject(JsonRpcClient client, com.fasterxml.jackson.databind.JsonNode node) private voidprocessNotifications(JsonRpcEvent notification) register(ReactorClient client) Registers new client withResponseWorker.voidrun()Methods 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
-
queue
-
MAPPER
private static final com.fasterxml.jackson.databind.ObjectMapper MAPPER -
tracker
-
publisher
-
log
private static final org.slf4j.Logger log -
SENSITIVE_DATA_PATTERN
-
-
Constructor Details
-
ResponseWorker
public ResponseWorker(int parallelism, int eventTimeoutInHours)
-
-
Method Details
-
register
Registers new client withResponseWorker.- Parameters:
client- -JsonRpcClientto be registered.- Returns:
- Client wrapper.
-
run
public void run() -
processIncomingObject
private void processIncomingObject(JsonRpcClient client, com.fasterxml.jackson.databind.JsonNode node) -
processNotifications
-
close
public void close() -
getPublisher
- Returns:
- publisher which can be used to subscribe to events defined by subscription id.
-