Package com.framed.core.utils
Class RemoteUtils
java.lang.Object
com.framed.core.utils.RemoteUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidparseAndDispatch(String jsonStr, Map<String, List<Consumer<Object>>> handlers, Map<Consumer<Object>, ExecutorService> handlerExecutors) Parses a JSON message and submits it to registered handlers.static voidparseAndDispatchAsync(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.static RemoteMessageparseMessage(String jsonStr)
-
Method Details
-
parseMessage
-
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 dispatchworkerPool- 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
-