Class RemoteUtils

java.lang.Object
com.framed.core.utils.RemoteUtils

public class RemoteUtils extends Object
  • Method Details

    • parseMessage

      @NotNull public static RemoteMessage parseMessage(String jsonStr)
    • parseAndDispatchAsync

      public static void parseAndDispatchAsync(String jsonStr, Map<String,List<Consumer<Object>>> handlers, ExecutorService workerPool)
      Parses a JSON message and submits it to registered handlers, creating a thread per handler.
      Parameters:
      jsonStr - the JSON string representing the message to parse and dispatch
      workerPool - the workerPool of the Transport
    • parseAndDispatch

      public static void parseAndDispatch(String jsonStr, Map<String,List<Consumer<Object>>> handlers, Map<Consumer<Object>,ExecutorService> handlerExecutors)
      Parses a JSON message and submits it to registered handlers.
      Parameters:
      jsonStr - the JSON string representing the message to parse and dispatch