Class PushPullRequestHandler

java.lang.Object
java.lang.Thread
org.kobe.xbot.JServer.BaseHandler
org.kobe.xbot.JServer.PushPullRequestHandler
All Implemented Interfaces:
Runnable

public class PushPullRequestHandler extends BaseHandler
PushPullRequestHandler - A handler for processing push-pull messages using JeroMQ.

This class handles incoming push-pull requests on a JeroMQ socket. It runs in its own thread and parses messages using Protocol Buffers. If the message is valid, 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 push-pull messaging in a multithreaded environment with JeroMQ.

  • Constructor Details

    • PushPullRequestHandler

      public PushPullRequestHandler(org.zeromq.ZMQ.Socket socket, XTablesServer instance)
      Constructor that initializes the handler with the provided socket and server instance.
      Parameters:
      socket - The ZeroMQ socket to receive messages on
      instance - The XTablesServer instance
  • Method Details

    • run

      public void run()
      The main method for handling incoming messages. It continuously receives messages from the JeroMQ socket and processes them.
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread