org.apache.camel.component.jetty
Interface JettyHttpBinding

All Known Implementing Classes:
DefaultJettyHttpBinding

public interface JettyHttpBinding

Jetty specific binding to parse the response when using JettyHttpProducer

Version:

Method Summary
 org.apache.camel.spi.HeaderFilterStrategy getHeaderFilterStrategy()
          Gets the header filter strategy
 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
 void populateResponse(org.apache.camel.Exchange exchange, JettyContentExchange httpExchange)
          Parses the response from the Jetty client.
 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
 

Method Detail

populateResponse

void populateResponse(org.apache.camel.Exchange exchange,
                      JettyContentExchange httpExchange)
                      throws Exception
Parses the response from the Jetty client.

Parameters:
exchange - the Exchange which to populate with the response
httpExchange - the response from the Jetty client
Throws:
Exception - is thrown if error parsing response

getHeaderFilterStrategy

org.apache.camel.spi.HeaderFilterStrategy getHeaderFilterStrategy()
Gets the header filter strategy

Returns:
the strategy

setHeaderFilterStrategy

void setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy)
Sets the header filter strategy to use.

Will default use HttpHeaderFilterStrategy

Parameters:
headerFilterStrategy - the custom strategy

setThrowExceptionOnFailure

void setThrowExceptionOnFailure(boolean throwExceptionOnFailure)
Whether to throw HttpOperationFailedException in case of response code != 200.

Parameters:
throwExceptionOnFailure - true to throw exception

isThrowExceptionOnFailure

boolean isThrowExceptionOnFailure()
Whether to throw HttpOperationFailedException in case of response code != 200.

Returns:
true to throw exception

setTransferException

void setTransferException(boolean transferException)
Whether to transfer exception back as a serialized java object if processing failed due to an exception

Parameters:
transferException - true to transfer exception

isTransferException

boolean isTransferException()
Whether to transfer exception back as a serialized java object if processing failed due to an exception

Returns:
true to transfer exception


Apache Camel