Class SyncResponseCallback
- java.lang.Object
-
- org.apache.camel.component.salesforce.internal.client.SyncResponseCallback
-
- All Implemented Interfaces:
RestClient.ResponseCallback
public class SyncResponseCallback extends Object implements RestClient.ResponseCallback
Thin wrapper to handle callback forRestClient.ResponseCallbackand allow waiting for results
-
-
Constructor Summary
Constructors Constructor Description SyncResponseCallback()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanawait(long duration, TimeUnit unit)SalesforceExceptiongetException()Map<String,String>getHeaders()InputStreamgetResponse()voidonResponse(InputStream response, Map<String,String> headers, SalesforceException exception)voidreset()
-
-
-
Method Detail
-
onResponse
public void onResponse(InputStream response, Map<String,String> headers, SalesforceException exception)
- Specified by:
onResponsein interfaceRestClient.ResponseCallback
-
reset
public void reset()
-
await
public boolean await(long duration, TimeUnit unit) throws InterruptedException- Throws:
InterruptedException
-
getResponse
public InputStream getResponse()
-
getException
public SalesforceException getException()
-
-