Class RpcGatewayUtils


  • public class RpcGatewayUtils
    extends Object
    Utils for RpcGateway implementations.
    • Method Detail

      • extractRpcTimeout

        public static Duration extractRpcTimeout​(Annotation[][] parameterAnnotations,
                                                 Object[] args,
                                                 Duration defaultTimeout)
        Extracts the RpcTimeout annotated rpc timeout value from the list of given method arguments. If no RpcTimeout annotated parameter could be found, then the default timeout is returned.
        Parameters:
        parameterAnnotations - Parameter annotations
        args - Array of arguments
        defaultTimeout - Default timeout to return if no RpcTimeout annotated parameter has been found
        Returns:
        Timeout extracted from the array of arguments or the default timeout