Class MessageHandler

java.lang.Object
dev.adlin.vts4j.network.MessageHandler
All Implemented Interfaces:
Consumer<String>

public class MessageHandler extends Object implements Consumer<String>
Core inbound message broker responsible for intercepting raw text payloads from the network, parsing them into system responses, and routing them either to awaiting request futures or distributing them as system events via the event bus.
  • Constructor Details

    • MessageHandler

      public MessageHandler()
  • Method Details

    • accept

      public void accept(@NonNull String payload)
      Intercepts an inbound raw JSON payload from the network socket and orchestrates its routing.

      If the payload corresponds to an active pending request ID, it is dispatched to the request track. If the payload represents a recognized event identifier, it is processed through the event sub-system.

      Specified by:
      accept in interface Consumer<String>
      Parameters:
      payload - the raw incoming text message string (usually JSON)