public class DefaultJettyHttpBinding extends Object implements JettyHttpBinding
| Constructor and Description |
|---|
DefaultJettyHttpBinding() |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
extractResponseBody(org.apache.camel.Exchange exchange,
JettyContentExchange httpExchange) |
org.apache.camel.spi.HeaderFilterStrategy |
getHeaderFilterStrategy()
Gets the header filter strategy
|
boolean |
isAllowJavaSerializedObject()
Whether to allow java serialization when a request uses context-type=application/x-java-serialized-object
This is by default turned off.
|
boolean |
isThrowExceptionOnFailure()
Whether to throw
HttpOperationFailedException
in case of response code != 200. |
boolean |
isTransferException()
Whether to transfer exception back as a serialized java object
if processing failed due to an exception
This is by default turned off.
|
protected Exception |
populateHttpOperationFailedException(org.apache.camel.Exchange exchange,
JettyContentExchange httpExchange,
int responseCode) |
void |
populateResponse(org.apache.camel.Exchange exchange,
JettyContentExchange httpExchange)
Parses the response from the Jetty client.
|
protected void |
populateResponse(org.apache.camel.Exchange exchange,
JettyContentExchange httpExchange,
org.apache.camel.Message in,
org.apache.camel.spi.HeaderFilterStrategy strategy,
int responseCode) |
void |
setAllowJavaSerializedObject(boolean allowJavaSerializedObject)
Whether to allow java serialization when a request uses context-type=application/x-java-serialized-object
This is by default turned off.
|
void |
setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy)
Sets the header filter strategy to use.
|
void |
setThrowExceptionOnFailure(boolean throwExceptionOnFailure)
Whether to throw
HttpOperationFailedException
in case of response code != 200. |
void |
setTransferException(boolean transferException)
Whether to transfer exception back as a serialized java object
if processing failed due to an exception
This is by default turned off.
|
public void populateResponse(org.apache.camel.Exchange exchange,
JettyContentExchange httpExchange)
throws Exception
JettyHttpBindingpopulateResponse in interface JettyHttpBindingexchange - the Exchange which to populate with the responsehttpExchange - the response from the Jetty clientException - is thrown if error parsing responsepublic org.apache.camel.spi.HeaderFilterStrategy getHeaderFilterStrategy()
JettyHttpBindinggetHeaderFilterStrategy in interface JettyHttpBindingpublic void setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy)
JettyHttpBindingHttpHeaderFilterStrategysetHeaderFilterStrategy in interface JettyHttpBindingheaderFilterStrategy - the custom strategypublic boolean isThrowExceptionOnFailure()
JettyHttpBindingHttpOperationFailedException
in case of response code != 200.isThrowExceptionOnFailure in interface JettyHttpBindingpublic void setThrowExceptionOnFailure(boolean throwExceptionOnFailure)
JettyHttpBindingHttpOperationFailedException
in case of response code != 200.setThrowExceptionOnFailure in interface JettyHttpBindingthrowExceptionOnFailure - true to throw exceptionpublic boolean isTransferException()
JettyHttpBindingisTransferException in interface JettyHttpBindingpublic void setTransferException(boolean transferException)
JettyHttpBindingsetTransferException in interface JettyHttpBindingtransferException - true to transfer exceptionpublic boolean isAllowJavaSerializedObject()
JettyHttpBindingisAllowJavaSerializedObject in interface JettyHttpBindingpublic void setAllowJavaSerializedObject(boolean allowJavaSerializedObject)
JettyHttpBindingsetAllowJavaSerializedObject in interface JettyHttpBindingallowJavaSerializedObject - true to allow serializing java objectsprotected void populateResponse(org.apache.camel.Exchange exchange,
JettyContentExchange httpExchange,
org.apache.camel.Message in,
org.apache.camel.spi.HeaderFilterStrategy strategy,
int responseCode)
throws IOException
IOExceptionprotected Exception populateHttpOperationFailedException(org.apache.camel.Exchange exchange, JettyContentExchange httpExchange, int responseCode) throws IOException
IOExceptionprotected Object extractResponseBody(org.apache.camel.Exchange exchange, JettyContentExchange httpExchange) throws IOException
IOExceptionApache Camel