Class AbstractCall<R>

  • Type Parameters:
    R - the return type of the called function
    All Implemented Interfaces:
    Call<R>
    Direct Known Subclasses:
    LocalCall, RunnerCall, WheelCall

    public abstract class AbstractCall<R>
    extends java.lang.Object
    implements Call<R>
    Abstract class for all function calls in salt.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String function  
      private java.lang.String functionName  
      private java.lang.String moduleName  
      private com.google.gson.reflect.TypeToken<R> returnType  
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractCall​(java.lang.String function, com.google.gson.reflect.TypeToken<R> returnType)
      Default constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) java.lang.String getFunction()
      Return the function string containing module and function name (e.g.
      java.lang.String getFunctionName()
      Return just the function name (e.g.
      java.lang.String getModuleName()
      Return the module name.
      com.google.gson.reflect.TypeToken<R> getReturnType()
      Return the return type of this call.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.suse.salt.netapi.calls.Call

        getPayload
    • Field Detail

      • moduleName

        private final java.lang.String moduleName
      • functionName

        private final java.lang.String functionName
      • function

        private final java.lang.String function
      • returnType

        private final com.google.gson.reflect.TypeToken<R> returnType
    • Constructor Detail

      • AbstractCall

        AbstractCall​(java.lang.String function,
                     com.google.gson.reflect.TypeToken<R> returnType)
        Default constructor.
        Parameters:
        function - string containing module and function name (e.g. "test.ping")
        returnType - the return type of this call
    • Method Detail

      • getFunction

        java.lang.String getFunction()
        Return the function string containing module and function name (e.g. "test.ping").
        Returns:
        function string containing module and function name (e.g. "test.ping")
      • getReturnType

        public com.google.gson.reflect.TypeToken<R> getReturnType()
        Return the return type of this call.
        Returns:
        returnType the return type of this call
      • getModuleName

        public java.lang.String getModuleName()
        Return the module name.
        Returns:
        moduleName the module name
      • getFunctionName

        public java.lang.String getFunctionName()
        Return just the function name (e.g. "ping" ).
        Returns:
        just the function name (e.g. "ping").