Class AbstractCall<R>

java.lang.Object
com.suse.salt.netapi.calls.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 Object implements Call<R>
Abstract class for all function calls in salt.
  • Field Details

    • moduleName

      private final String moduleName
    • functionName

      private final String functionName
    • function

      private final String function
    • returnType

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

    • AbstractCall

      AbstractCall(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 Details

    • getFunction

      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 String getModuleName()
      Return the module name.
      Returns:
      moduleName the module name
    • getFunctionName

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