Class GenericEndpoint

  • All Implemented Interfaces:
    Endpoint

    public class GenericEndpoint
    extends java.lang.Object
    implements Endpoint
    An endpoint that reflectively delegates to JsonNotification and JsonRequest methods of one or more given delegate objects.
    • Constructor Summary

      Constructors 
      Constructor Description
      GenericEndpoint​(java.lang.Object delegate)  
      GenericEndpoint​(java.util.Collection<java.lang.Object> delegates)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.Object[] getArguments​(java.lang.reflect.Method method, java.lang.Object arg)  
      protected boolean isOptionalMethod​(java.lang.String method)  
      void notify​(java.lang.String method, java.lang.Object parameter)  
      protected void recursiveFindRpcMethods​(java.lang.Object current, java.util.Set<java.lang.Class<?>> visited, java.util.Set<java.lang.Class<?>> visitedForDelegate)  
      java.util.concurrent.CompletableFuture<?> request​(java.lang.String method, java.lang.Object parameter)  
      • Methods inherited from class java.lang.Object

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

      • GenericEndpoint

        public GenericEndpoint​(java.lang.Object delegate)
      • GenericEndpoint

        public GenericEndpoint​(java.util.Collection<java.lang.Object> delegates)
    • Method Detail

      • recursiveFindRpcMethods

        protected void recursiveFindRpcMethods​(java.lang.Object current,
                                               java.util.Set<java.lang.Class<?>> visited,
                                               java.util.Set<java.lang.Class<?>> visitedForDelegate)
      • getArguments

        protected java.lang.Object[] getArguments​(java.lang.reflect.Method method,
                                                  java.lang.Object arg)
      • request

        public java.util.concurrent.CompletableFuture<?> request​(java.lang.String method,
                                                                 java.lang.Object parameter)
        Specified by:
        request in interface Endpoint
      • notify

        public void notify​(java.lang.String method,
                           java.lang.Object parameter)
        Specified by:
        notify in interface Endpoint
      • isOptionalMethod

        protected boolean isOptionalMethod​(java.lang.String method)