Class AbstractConnectorRequest<R extends ConnectorResponse>

java.lang.Object
org.camunda.connect.impl.AbstractConnectorRequest<R>
All Implemented Interfaces:
ConnectorRequest<R>
Direct Known Subclasses:
AbstractHttpRequest

public abstract class AbstractConnectorRequest<R extends ConnectorResponse> extends Object implements ConnectorRequest<R>
Author:
Daniel Meyer
  • Field Details

  • Constructor Details

    • AbstractConnectorRequest

      public AbstractConnectorRequest(Connector connector)
  • Method Details

    • execute

      public R execute()
      Description copied from interface: ConnectorRequest
      Execute the request. Once a request is configured with all input parameters, it can be executed.
      Specified by:
      execute in interface ConnectorRequest<R extends ConnectorResponse>
      Returns:
      the return value of the request.
    • isRequestValid

      protected boolean isRequestValid()
      Allows subclasses to provide custom validation logic of the request parameters.
      Returns:
      true if the request parameters are valid.
    • setRequestParameters

      public void setRequestParameters(Map<String,Object> params)
      Description copied from interface: ConnectorRequest
      Provides the named input parameters of the request.
      Specified by:
      setRequestParameters in interface ConnectorRequest<R extends ConnectorResponse>
      Parameters:
      params - the named input parameters of the request.
    • setRequestParameter

      public void setRequestParameter(String name, Object value)
      Sets a request parameter on the request
      Specified by:
      setRequestParameter in interface ConnectorRequest<R extends ConnectorResponse>
      Parameters:
      name - the name of the parameter
      value - the value of the parameter
    • getRequestParameters

      public Map<String,Object> getRequestParameters()
      Description copied from interface: ConnectorRequest
      Returns the map of request parameters
      Specified by:
      getRequestParameters in interface ConnectorRequest<R extends ConnectorResponse>
      Returns:
      the parameters as handed in to the request.
    • getRequestParameter

      public <V> V getRequestParameter(String name)
      Description copied from interface: ConnectorRequest
      Returns the value of a request parameter
      Specified by:
      getRequestParameter in interface ConnectorRequest<R extends ConnectorResponse>
      Parameters:
      name - the name of the request parameter
      Returns:
      the value of the request parameter of 'null' if the parameter is not set.