|
||||||||||
| 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()
Deprecated. |
|
DefaultHttpBinding(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy)
Deprecated. |
|
DefaultHttpBinding(HttpEndpoint endpoint)
|
|
| Method Summary | |
|---|---|
protected boolean |
checkChunked(org.apache.camel.Message message,
org.apache.camel.Exchange exchange)
|
protected int |
copyStream(InputStream is,
OutputStream os,
int bufferSize)
|
protected void |
doWriteDirectResponse(org.apache.camel.Message message,
javax.servlet.http.HttpServletResponse response,
org.apache.camel.Exchange exchange)
|
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 |
protected void |
doWriteGZIPResponse(org.apache.camel.Message message,
javax.servlet.http.HttpServletResponse response,
org.apache.camel.Exchange exchange)
|
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 |
protected boolean |
isText(String contentType)
|
boolean |
isUseReaderForPayload()
Should reader by used instead of input stream. |
Object |
parseBody(HttpMessage httpMessage)
Parses the body from a HttpMessage |
protected void |
populateAttachments(javax.servlet.http.HttpServletRequest request,
HttpMessage message)
|
protected void |
populateRequestParameters(javax.servlet.http.HttpServletRequest request,
HttpMessage message)
|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
@Deprecated public DefaultHttpBinding()
@Deprecated public DefaultHttpBinding(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy)
public DefaultHttpBinding(HttpEndpoint endpoint)
| Method Detail |
|---|
public void readRequest(javax.servlet.http.HttpServletRequest request,
HttpMessage message)
HttpBinding
readRequest in interface HttpBindingrequest - the requestmessage - the message to populate with data from request
protected void populateRequestParameters(javax.servlet.http.HttpServletRequest request,
HttpMessage message)
throws Exception
Exception
protected void populateAttachments(javax.servlet.http.HttpServletRequest request,
HttpMessage message)
public void writeResponse(org.apache.camel.Exchange exchange,
javax.servlet.http.HttpServletResponse response)
throws IOException
HttpBinding
writeResponse in interface HttpBindingexchange - the exchangeresponse - the http response
IOException - can be thrown from http response
public void doWriteExceptionResponse(Throwable exception,
javax.servlet.http.HttpServletResponse response)
throws IOException
HttpBinding
doWriteExceptionResponse in interface HttpBindingexception - the exception occurredresponse - the http response
IOException - can be thrown from http response
public void doWriteFaultResponse(org.apache.camel.Message message,
javax.servlet.http.HttpServletResponse response,
org.apache.camel.Exchange exchange)
throws IOException
HttpBinding
doWriteFaultResponse in interface HttpBindingmessage - the fault messageresponse - the http responseexchange - the exchange to provide context for header filtering
IOException - can be thrown from http response
public void doWriteResponse(org.apache.camel.Message message,
javax.servlet.http.HttpServletResponse response,
org.apache.camel.Exchange exchange)
throws IOException
HttpBinding
doWriteResponse in interface HttpBindingmessage - the OUT messageresponse - the http responseexchange - the exchange to provide context for header filtering
IOException - can be thrown from http responseprotected boolean isText(String contentType)
protected int copyStream(InputStream is,
OutputStream os,
int bufferSize)
throws IOException
IOException
protected void doWriteDirectResponse(org.apache.camel.Message message,
javax.servlet.http.HttpServletResponse response,
org.apache.camel.Exchange exchange)
throws IOException
IOException
protected boolean checkChunked(org.apache.camel.Message message,
org.apache.camel.Exchange exchange)
protected void doWriteGZIPResponse(org.apache.camel.Message message,
javax.servlet.http.HttpServletResponse response,
org.apache.camel.Exchange exchange)
throws IOException
IOException
public Object parseBody(HttpMessage httpMessage)
throws IOException
HttpBindingHttpMessage
parseBody in interface HttpBindinghttpMessage - the http message
InputStream or a Reader
depending on the HttpBinding.setUseReaderForPayload(boolean) property.
IOException - can be thrownpublic boolean isUseReaderForPayload()
HttpBinding
isUseReaderForPayload in interface HttpBindingfor more detailspublic void setUseReaderForPayload(boolean useReaderForPayload)
HttpBindingServletRequest.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.
setUseReaderForPayload in interface HttpBindinguseReaderForPayload - whether to use reader or notpublic org.apache.camel.spi.HeaderFilterStrategy getHeaderFilterStrategy()
HttpBinding
getHeaderFilterStrategy in interface HttpBindingpublic void setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy)
HttpBindingHttpHeaderFilterStrategy
setHeaderFilterStrategy in interface HttpBindingheaderFilterStrategy - the custom strategy
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||