Class JsonRpcServer

java.lang.Object
com.xxl.tool.jsonrpc.JsonRpcServer

public class JsonRpcServer extends Object
json-rpc server
Author:
xuxueli
  • Constructor Details

    • JsonRpcServer

      public JsonRpcServer()
  • Method Details

    • newServer

      public static JsonRpcServer newServer()
    • register

      public JsonRpcServer register(String service, Object serviceInstance)
      register service
      Parameters:
      service - the service name
      serviceInstance - the service instance
    • register

      public JsonRpcServer register(Map<String,Object> initServiceStore)
      register service
      Parameters:
      initServiceStore - the service store
    • invoke

      public String invoke(String requestBody)
      invoke (with origin data)
      Parameters:
      requestBody - the request body
      Returns:
      the response body