public interface HttpBinding
Modifier and Type | Method and Description |
---|---|
void |
doWriteExceptionResponse(Throwable exception,
javax.servlet.http.HttpServletResponse response)
Strategy method that writes the response to the http response stream when an exception occurred
|
void |
doWriteFaultResponse(org.apache.camel.Message message,
javax.servlet.http.HttpServletResponse response,
org.apache.camel.Exchange exchange)
Strategy method that writes the response to the http response stream for a fault message
|
void |
doWriteResponse(org.apache.camel.Message message,
javax.servlet.http.HttpServletResponse response,
org.apache.camel.Exchange exchange)
Strategy method that writes the response to the http response stream for an OUT message
|
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 |
isEagerCheckContentAvailable()
Whether to eager check whether the HTTP requests has content if the content-length header is 0 or not present.
|
boolean |
isMapHttpMessageBody()
Whether to allow Exchange Body HTTP mapping
|
boolean |
isMapHttpMessageFormUrlEncodedBody()
Whether to allow Exchange Form URL Encoded Body HTTP mapping
|
boolean |
isMapHttpMessageHeaders()
Whether to allow Exchange Headers HTTP mapping
|
boolean |
isTransferException()
If enabled and an Exchange failed processing on the consumer side, and if the caused Exception was send back
serialized in the response as a application/x-java-serialized-object content type (for example using Jetty or
Servlet Camel components).
|
boolean |
isUseReaderForPayload()
Should reader by used instead of input stream.
|
Object |
parseBody(HttpMessage httpMessage)
Parses the body from a
HttpMessage |
void |
readRequest(javax.servlet.http.HttpServletRequest request,
HttpMessage message)
Strategy to read the given request and bindings it to the given message.
|
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 |
setEagerCheckContentAvailable(boolean eagerCheckContentAvailable)
Whether to eager check whether the HTTP requests has content if the content-length header is 0 or not present.
|
void |
setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy)
Sets the header filter strategy to use.
|
void |
setMapHttpMessageBody(boolean mapHttpMessageBody)
Whether to allow Exchange Body HTTP mapping
This is by default turned on.
|
void |
setMapHttpMessageFormUrlEncodedBody(boolean mapHttpMessageFormUrlEncodedBody)
Whether to allow Exchange Form URL Encoded Body HTTP mapping
This is by default turned on.
|
void |
setMapHttpMessageHeaders(boolean mapHttpMessageHeaders)
Whether to allow Exchange Headers HTTP mapping
This is by default turned on.
|
void |
setTransferException(boolean transferException)
If enabled and an Exchange failed processing on the consumer side, and if the caused Exception was send back
serialized in the response as a application/x-java-serialized-object content type (for example using Jetty or
Servlet Camel components).
|
void |
setUseReaderForPayload(boolean useReaderForPayload)
Should the
ServletRequest.getReader() be exposed as the payload of input messages in the Camel
Message.getBody() or not. |
void |
writeResponse(org.apache.camel.Exchange exchange,
javax.servlet.http.HttpServletResponse response)
Writes the exchange to the servlet response.
|
void readRequest(javax.servlet.http.HttpServletRequest request, HttpMessage message)
request
- the requestmessage
- the message to populate with data from requestObject parseBody(HttpMessage httpMessage) throws IOException
HttpMessage
httpMessage
- the http messageInputStream
or a Reader
depending on the setUseReaderForPayload(boolean)
property.IOException
- can be thrownvoid writeResponse(org.apache.camel.Exchange exchange, javax.servlet.http.HttpServletResponse response) throws IOException
exchange
- the exchangeresponse
- the http responseIOException
- can be thrown from http responsevoid doWriteExceptionResponse(Throwable exception, javax.servlet.http.HttpServletResponse response) throws IOException
exception
- the exception occurredresponse
- the http responseIOException
- can be thrown from http responsevoid doWriteFaultResponse(org.apache.camel.Message message, javax.servlet.http.HttpServletResponse response, org.apache.camel.Exchange exchange) throws IOException
message
- the fault messageresponse
- the http responseexchange
- the exchange to provide context for header filteringIOException
- can be thrown from http responsevoid doWriteResponse(org.apache.camel.Message message, javax.servlet.http.HttpServletResponse response, org.apache.camel.Exchange exchange) throws IOException
message
- the OUT messageresponse
- the http responseexchange
- the exchange to provide context for header filteringIOException
- can be thrown from http responseboolean isUseReaderForPayload()
for more details
void setUseReaderForPayload(boolean useReaderForPayload)
ServletRequest.getReader()
be exposed as the payload of input messages in the Camel
Message.getBody()
or not. If false then the ServletRequest.getInputStream()
will be exposed.
Is default false.useReaderForPayload
- whether to use reader or notboolean isTransferException()
boolean isAllowJavaSerializedObject()
boolean isEagerCheckContentAvailable()
boolean isMapHttpMessageBody()
boolean isMapHttpMessageHeaders()
boolean isMapHttpMessageFormUrlEncodedBody()
void setEagerCheckContentAvailable(boolean eagerCheckContentAvailable)
void setTransferException(boolean transferException)
void setAllowJavaSerializedObject(boolean allowJavaSerializedObject)
allowJavaSerializedObject
- true to allow serializing java objectsorg.apache.camel.spi.HeaderFilterStrategy getHeaderFilterStrategy()
void setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy)
HttpHeaderFilterStrategy
headerFilterStrategy
- the custom strategyvoid setMapHttpMessageBody(boolean mapHttpMessageBody)
void setMapHttpMessageHeaders(boolean mapHttpMessageHeaders)
void setMapHttpMessageFormUrlEncodedBody(boolean mapHttpMessageFormUrlEncodedBody)
Apache Camel