public interface TextAdapter
Modifier and Type | Method and Description |
---|---|
void |
closeConnection(java.lang.Object connection)
Close a connection opened.
|
Response |
doInvoke(java.lang.Object connection,
Request request,
int timeout,
java.util.Map<java.lang.String,java.lang.String> headers) |
void |
init()
Initialization.
|
java.lang.String |
invoke(java.lang.Object connection,
java.lang.String request,
int timeout,
java.util.Map<java.lang.String,java.lang.String> headers)
send a message to external system, and if the underlying
protocol is synchronous (WebService, EJB, etc), the
response is returned.
|
java.lang.String |
onFailure(java.lang.Throwable errorCause)
Handle failure response.
|
void |
onSuccess(java.lang.String response)
Handle success response.
|
java.lang.Object |
openConnection()
Open connection
|
void init() throws ConnectionException, AdapterException
ConnectionException
AdapterException
java.lang.Object openConnection() throws ConnectionException, AdapterException
ConnectionException
- retriable connection failureAdapterException
- non-retriable connection failurevoid closeConnection(java.lang.Object connection)
connection
- the object returned by openConnection()
and is typically the adapter activity instance itself.java.lang.String invoke(java.lang.Object connection, java.lang.String request, int timeout, java.util.Map<java.lang.String,java.lang.String> headers) throws AdapterException, ConnectionException
connection
- 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 IDAdapterException
ConnectionException
Response doInvoke(java.lang.Object connection, Request request, int timeout, java.util.Map<java.lang.String,java.lang.String> headers) throws AdapterException, ConnectionException
AdapterException
ConnectionException
void onSuccess(java.lang.String response) throws ActivityException, ConnectionException, AdapterException
response
- response contentActivityException
ConnectionException
AdapterException
java.lang.String onFailure(java.lang.Throwable errorCause) throws AdapterException, ConnectionException
errorCause
- throwable that triggered failureAdapterException
ConnectionException
Copyright © 2019 CenturyLink, Inc.