@Tracked(value=TRACE) @Activity(value="Multi-REST Service Adapter", category=AdapterActivity.class, icon="com.centurylink.mdw.base/adapter.png", pagelet="com.centurylink.mdw.base/multiRest.pagelet") public class MultiRestServiceAdapter extends RestServiceAdapter
AUTH_APP_ID, AUTH_PASSWORD, AUTH_PROVIDER, AUTH_USER, ENDPOINT_URI, HEADERS_VARIABLE, HTTP_METHOD, REQUEST_VARIABLE
CONNECT_TIMEOUT, DEFAULT_ERROR_HTTP_CODE, DEFAULT_RETRY_HTTP_CODE, ERROR_HTTP_CODES, PROP_PASS, PROP_USER, READ_TIMEOUT, RETRY_HTTP_CODES
DISABLED, GROOVY, JAVA_EL, JAVASCRIPT, logger, OUTPUTDOCS
COMPCODE_AUTO_RETRY, DEFAULT_STUBBER_PORT, DEFAULT_STUBBER_TIMEOUT, DO_LOGGING, MAKE_ACTUAL_CALL, PROP_MAX_TRIES, PROP_RETRY_INTERVAL, PROP_SYNCHRONOUS_RESPONSE, PROP_TIMEOUT, REQUEST_XSD, RESPONSE_VARIABLE, RESPONSE_XSD
Constructor and Description |
---|
MultiRestServiceAdapter() |
Modifier and Type | Method and Description |
---|---|
protected java.util.List<java.lang.Object> |
getConnectionObjs() |
protected java.util.List<java.lang.String> |
getEndpointUris()
Returns the endpoint URLs for the RESTful service.
|
java.lang.String |
invoke(java.lang.Object conn,
java.lang.String request,
int timeout,
java.util.Map<java.lang.String,java.lang.String> headers)
Invokes the RESTful service by submitting an HTTP requests against the configured
endpoint URIs.
|
java.lang.Object |
openConnection()
Open connection
|
java.lang.Object |
openConnection(java.lang.String endpointUri)
Returns an HttpConnection based on the configured endpoint, which
includes the resource path.
|
getAdapterInvocationErrorMessage, getAuthProvider, getEndpointUri, getHttpHelper, getHttpMethod, getRequestData, getRequestHeaders, getRequestMeta, getRequestParameters, getResponseHeaders, getResponseMeta, getStubRequest, getUrlEncoding, invoke, logRequest, openConnection, openConnection, performHttpAction, setResponseHeaders
canBeAsynchronous, canBeSynchronous, closeConnection, getConnectTimeout, getReadTimeout, getResponse, init, setRequestHeaders
directInvoke, doInvoke, doLogging, execute, executePostScript, executePreScript, filterStubResponse, getAttribute, getErrorCode, getMaxTries, getRetryInterval, getStubbedResponse, getStubResponse, getTimeoutForResponse, handleConnectionException, handleException, handleRetry, hasPostScript, hasPreScript, isRetryable, isStubMode, isSynchronous, logRequest, logResponse, logResponse, onFailure, onSuccess, populateResponseVariable
execute
createDocument, createDocument, createDocument, createDocument, evaluateExpression, executeScript, getActivityId, getActivityInstance, getActivityInstanceId, getActivityName, getAttribute, getAttribute, getAttribute, getAttribute, getAttributes, getAttributeValue, getAttributeValueSmart, getDocument, getDocumentContent, getDocumentForUpdate, getDocumentType, getEngine, getExternalEventInstanceDetails, getLogger, getMainProcessDefinition, getMasterRequestId, getOutputDocuments, getPackage, getParameterId, getParameters, getParameterStringValue, getParameterType, getParameterValue, getPerformanceLevel, getProcessDefinition, getProcessId, getProcessInstance, getProcessInstanceId, getProcessInstanceOwner, getProcessInstanceOwnerId, getProperty, getRequiredAttribute, getRequiredVariableValue, getReturnCode, getReturnMessage, getRuntimeContext, getScriptEvaluator, getScriptExecClassName, getScriptExecutor, getValue, getValues, getValueSmart, getVariableInstance, getVariableValue, getVariableValueSmart, getWorkTransitionInstanceId, initialize, isDisabled, isLogDebugEnabled, isLogInfoEnabled, isOutputDocument, lockActivityInstance, lockProcessInstance, logdebug, logDebug, logError, logError, logexception, loginfo, logInfo, logsevere, logwarn, logWarn, prepare, setOutputDocuments, setParameterValue, setParameterValueAsDocument, setParameterValues, setProcessInstanceCompletionCode, setReturnCode, setReturnMessage, setValue, setVariableValue, setVariableValue, startTransaction, stopTransaction, translatePlaceHolder, updateDocumentContent, updateDocumentInfo, updateDocumentInfo, valueIsJavaExpression, valueIsVariable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
execute
public java.lang.Object openConnection()
TextAdapter
openConnection
in interface TextAdapter
openConnection
in class RestServiceAdapter
public java.lang.Object openConnection(java.lang.String endpointUri) throws ConnectionException
ConnectionException
protected java.util.List<java.lang.Object> getConnectionObjs() throws ConnectionException, AdapterException
ConnectionException
AdapterException
protected java.util.List<java.lang.String> getEndpointUris() throws AdapterException
BaseActivity.getAttribute(String)
.ActivityException
AdapterException
public java.lang.String invoke(java.lang.Object conn, java.lang.String request, int timeout, java.util.Map<java.lang.String,java.lang.String> headers) throws ConnectionException, AdapterException
invoke
in interface TextAdapter
invoke
in class RestServiceAdapter
conn
- the object returned by openConnection()
and is typically the adapter activity instance itself.request
- request contenttimeout
- time out in seconds. Ignored if no response is expected.headers
- protocol request data, e.g. correlation IDConnectionException
AdapterException
TextAdapter.invoke(java.lang.Object, java.lang.String, int, java.util.Map)
Copyright © 2019 CenturyLink, Inc.