Class ClientCallbackOperation

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String fqName_  
      private static java.util.Map OPERATION_MAP  
      private java.lang.Class[] sampSig_  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private ClientCallbackOperation​(java.lang.String methodName, java.lang.Class[] sampSig)
      Constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      private static java.util.Map createOperationMap()
      Returns a map, keyed by unqualified operation name, of known callback operations.
      (package private) abstract void dispatch​(CallableClient client, java.util.List paramList)
      Makes a call to a callable client of the method represented by this operation with a given list of parameters.
      static void invoke​(Callback callback, CallableClient client)
      Dispatches a callback to a CallableClient.
      • Methods inherited from class java.lang.Object

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

      • fqName_

        private final java.lang.String fqName_
      • sampSig_

        private final java.lang.Class[] sampSig_
      • OPERATION_MAP

        private static final java.util.Map OPERATION_MAP
    • Constructor Detail

      • ClientCallbackOperation

        private ClientCallbackOperation​(java.lang.String methodName,
                                        java.lang.Class[] sampSig)
        Constructor.
        Parameters:
        unqualified - callback method name
        signature - of callback; an array of SAMP-friendly classes, one for each argument
    • Method Detail

      • dispatch

        abstract void dispatch​(CallableClient client,
                               java.util.List paramList)
                        throws java.lang.Exception
        Makes a call to a callable client of the method represented by this operation with a given list of parameters. No checking is performed on the parameter list.

        This method should be private really, but abstract private is not permitted.

        Parameters:
        client - target callable client
        paramList - parameters for call, assumed to be valid
        Throws:
        java.lang.Exception
      • invoke

        public static void invoke​(Callback callback,
                                  CallableClient client)
                           throws java.lang.Exception
        Dispatches a callback to a CallableClient.
        Parameters:
        callback - callback acquired from the hub
        client - client which should execute callback
        Throws:
        java.lang.Exception
      • createOperationMap

        private static java.util.Map createOperationMap()
        Returns a map, keyed by unqualified operation name, of known callback operations.
        Parameters:
        String - ->ClientCallbackOperation map