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 |
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 |
setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy)
Sets the header filter strategy to use.
|
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 notorg.apache.camel.spi.HeaderFilterStrategy getHeaderFilterStrategy()
void setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy)
HttpHeaderFilterStrategy
headerFilterStrategy
- the custom strategyApache Camel