|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.component.http.DefaultHttpBinding
public class DefaultHttpBinding
Binding between HttpMessage
and HttpServletResponse
.
Constructor Summary | |
---|---|
DefaultHttpBinding()
|
|
DefaultHttpBinding(HeaderFilterStrategy headerFilterStrategy)
|
Method Summary | |
---|---|
protected void |
doWriteDirectResponse(Message message,
HttpServletResponse response,
Exchange exchange)
|
void |
doWriteExceptionResponse(Throwable exception,
HttpServletResponse response)
Strategy method that writes the response to the http response stream when an exception occuerd |
void |
doWriteFaultResponse(Message message,
HttpServletResponse response,
Exchange exchange)
Strategy method that writes the response to the http response stream for a fault message |
protected void |
doWriteGZIPResponse(Message message,
HttpServletResponse response,
Exchange exchange)
|
void |
doWriteResponse(Message message,
HttpServletResponse response,
Exchange exchange)
Strategy method that writes the response to the http response stream for an OUT message |
HeaderFilterStrategy |
getHeaderFilterStrategy()
|
boolean |
isUseReaderForPayload()
|
Object |
parseBody(HttpMessage httpMessage)
Parses the body from a HttpMessage |
void |
readRequest(HttpServletRequest request,
HttpMessage message)
Startegy to read the given request and bindings it to the given message. |
void |
setHeaderFilterStrategy(HeaderFilterStrategy headerFilterStrategy)
Sets the header filter stratety 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(Exchange exchange,
HttpServletResponse response)
Writes the exchange to the servlet response. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultHttpBinding()
public DefaultHttpBinding(HeaderFilterStrategy headerFilterStrategy)
Method Detail |
---|
public void readRequest(HttpServletRequest request, HttpMessage message)
HttpBinding
readRequest
in interface HttpBinding
request
- the requestmessage
- the message to populate with data from requestpublic void writeResponse(Exchange exchange, HttpServletResponse response) throws IOException
HttpBinding
writeResponse
in interface HttpBinding
exchange
- the exchangeresponse
- the http response
IOException
- can be thrown from http responsepublic void doWriteExceptionResponse(Throwable exception, HttpServletResponse response) throws IOException
HttpBinding
doWriteExceptionResponse
in interface HttpBinding
exception
- the exception occuredresponse
- the http response
IOException
- can be thrown from http responsepublic void doWriteFaultResponse(Message message, HttpServletResponse response, Exchange exchange) throws IOException
HttpBinding
doWriteFaultResponse
in interface HttpBinding
message
- the fault messageresponse
- the http responseexchange
- the exchange to provide context for header filtering
IOException
- can be thrown from http responsepublic void doWriteResponse(Message message, HttpServletResponse response, Exchange exchange) throws IOException
HttpBinding
doWriteResponse
in interface HttpBinding
message
- the OUT messageresponse
- the http responseexchange
- the exchange to provide context for header filtering
IOException
- can be thrown from http responseprotected void doWriteDirectResponse(Message message, HttpServletResponse response, Exchange exchange) throws IOException
IOException
protected void doWriteGZIPResponse(Message message, HttpServletResponse response, Exchange exchange) throws IOException
IOException
public Object parseBody(HttpMessage httpMessage) throws IOException
HttpBinding
HttpMessage
parseBody
in interface HttpBinding
InputStream
or a Reader
depending on the HttpBinding.setUseReaderForPayload(boolean)
property.
IOException
- can be thrownpublic boolean isUseReaderForPayload()
isUseReaderForPayload
in interface HttpBinding
public void setUseReaderForPayload(boolean useReaderForPayload)
HttpBinding
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.
setUseReaderForPayload
in interface HttpBinding
public HeaderFilterStrategy getHeaderFilterStrategy()
getHeaderFilterStrategy
in interface HttpBinding
public void setHeaderFilterStrategy(HeaderFilterStrategy headerFilterStrategy)
HttpBinding
HttpHeaderFilterStrategy
setHeaderFilterStrategy
in interface HttpBinding
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |