Package org.camunda.connect.impl
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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionexecute()
Execute the request.<V> V
getRequestParameter
(String name) Returns the value of a request parameterReturns the map of request parametersprotected boolean
Allows subclasses to provide custom validation logic of the request parameters.void
setRequestParameter
(String name, Object value) Sets a request parameter on the requestvoid
setRequestParameters
(Map<String, Object> params) Provides the named input parameters of the request.
-
Field Details
-
connector
-
requestParameters
-
-
Constructor Details
-
AbstractConnectorRequest
-
-
Method Details
-
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 interfaceConnectorRequest<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
Description copied from interface:ConnectorRequest
Provides the named input parameters of the request.- Specified by:
setRequestParameters
in interfaceConnectorRequest<R extends ConnectorResponse>
- Parameters:
params
- the named input parameters of the request.
-
setRequestParameter
Sets a request parameter on the request- Specified by:
setRequestParameter
in interfaceConnectorRequest<R extends ConnectorResponse>
- Parameters:
name
- the name of the parametervalue
- the value of the parameter
-
getRequestParameters
Description copied from interface:ConnectorRequest
Returns the map of request parameters- Specified by:
getRequestParameters
in interfaceConnectorRequest<R extends ConnectorResponse>
- Returns:
- the parameters as handed in to the request.
-
getRequestParameter
Description copied from interface:ConnectorRequest
Returns the value of a request parameter- Specified by:
getRequestParameter
in interfaceConnectorRequest<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.
-