Package org.kobe.xbot.JServer
Class ReplyRequestHandler
java.lang.Object
java.lang.Thread
org.kobe.xbot.JServer.BaseHandler
org.kobe.xbot.JServer.ReplyRequestHandler
- All Implemented Interfaces:
Runnable
ReplyRequestHandler - A handler for processing reply requests using JeroMQ.
This class processes incoming reply requests on a JeroMQ socket. It runs in its own thread and parses messages using Protocol Buffers. If the message contains a valid command, further processing can be implemented inside the `run` method. The thread is set as a daemon, meaning it won't block the JVM from exiting.
Author: Kobe Lei Package: XTABLES Version: 1.0
This class is part of the XTABLES project and is used for handling server-side reply requests in a multithreaded environment with JeroMQ.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-
Field Summary
Fields inherited from class org.kobe.xbot.JServer.BaseHandler
logger, socket
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
Constructor Summary
ConstructorsConstructorDescriptionReplyRequestHandler
(org.zeromq.ZMQ.Socket socket, XTablesServer instance) Constructor that initializes the handler with the provided socket and server instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
run()
The main method for handling incoming reply requests.Methods inherited from class org.kobe.xbot.JServer.BaseHandler
cleanUp, handleException, interrupt
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, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
Constructor Details
-
ReplyRequestHandler
Constructor that initializes the handler with the provided socket and server instance.- Parameters:
socket
- The ZeroMQ socket to receive reply requests oninstance
- The XTablesServer instance
-
-
Method Details