Class ServiceEndpoints


  • public final class ServiceEndpoints
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Map<java.lang.String,​JsonRpcMethod> getSupportedMethods​(java.lang.Class<?> type)
      Finds all Json RPC methods on a given class.
      static Endpoint toEndpoint​(java.lang.Object serviceObject)
      Wraps a given object with service annotations behind an Endpoint interface.
      static Endpoint toEndpoint​(java.util.Collection<java.lang.Object> serviceObjects)
      Wraps a collection of objects with service annotations behind an Endpoint interface.
      static <T> T toServiceObject​(Endpoint endpoint, java.lang.Class<T> interface_)
      Wraps a given Endpoint in the given service interface.
      static java.lang.Object toServiceObject​(Endpoint endpoint, java.util.Collection<java.lang.Class<?>> interfaces, java.lang.ClassLoader classLoader)
      Wraps a given Endpoint in the given service interfaces.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • toServiceObject

        public static <T> T toServiceObject​(Endpoint endpoint,
                                            java.lang.Class<T> interface_)
        Wraps a given Endpoint in the given service interface.
        Returns:
        the wrapped service object
      • toServiceObject

        public static java.lang.Object toServiceObject​(Endpoint endpoint,
                                                       java.util.Collection<java.lang.Class<?>> interfaces,
                                                       java.lang.ClassLoader classLoader)
        Wraps a given Endpoint in the given service interfaces.
        Returns:
        the wrapped service object
      • toEndpoint

        public static Endpoint toEndpoint​(java.lang.Object serviceObject)
        Wraps a given object with service annotations behind an Endpoint interface.
        Returns:
        the wrapped service endpoint
      • toEndpoint

        public static Endpoint toEndpoint​(java.util.Collection<java.lang.Object> serviceObjects)
        Wraps a collection of objects with service annotations behind an Endpoint interface.
        Returns:
        the wrapped service endpoint
      • getSupportedMethods

        public static java.util.Map<java.lang.String,​JsonRpcMethod> getSupportedMethods​(java.lang.Class<?> type)
        Finds all Json RPC methods on a given class.
        Returns:
        the supported JsonRpcMethods