|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.camel.component.netty.http.DefaultNettyHttpBinding
public class DefaultNettyHttpBinding
Default NettyHttpBinding
.
Constructor Summary | |
---|---|
DefaultNettyHttpBinding()
|
|
DefaultNettyHttpBinding(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy)
|
Method Summary | |
---|---|
org.apache.camel.spi.HeaderFilterStrategy |
getHeaderFilterStrategy()
Gets the header filter strategy |
void |
populateCamelHeaders(org.jboss.netty.handler.codec.http.HttpRequest request,
Map<String,Object> headers,
org.apache.camel.Exchange exchange,
NettyHttpConfiguration configuration)
Binds from Netty HttpRequest to Camel headers as a Map . |
void |
populateCamelHeaders(org.jboss.netty.handler.codec.http.HttpResponse response,
Map<String,Object> headers,
org.apache.camel.Exchange exchange,
NettyHttpConfiguration configuration)
Binds from Netty HttpResponse to Camel headers as a Map . |
void |
setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy)
Sets the header filter strategy to use. |
protected String |
shouldUrlDecodeHeader(NettyHttpConfiguration configuration,
String headerName,
Object value,
String charset)
Decodes the header if needed to, or returns the header value as is. |
org.apache.camel.Message |
toCamelMessage(org.jboss.netty.handler.codec.http.HttpRequest request,
org.apache.camel.Exchange exchange,
NettyHttpConfiguration configuration)
Binds from Netty HttpRequest to Camel Message . |
org.apache.camel.Message |
toCamelMessage(org.jboss.netty.handler.codec.http.HttpResponse response,
org.apache.camel.Exchange exchange,
NettyHttpConfiguration configuration)
Binds from Netty HttpResponse to Camel Message . |
org.jboss.netty.handler.codec.http.HttpRequest |
toNettyRequest(org.apache.camel.Message message,
String uri,
NettyHttpConfiguration configuration)
Binds from Camel Message to Netty HttpRequest . |
org.jboss.netty.handler.codec.http.HttpResponse |
toNettyResponse(org.apache.camel.Message message,
NettyHttpConfiguration configuration)
Binds from Camel Message to Netty HttpResponse . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultNettyHttpBinding()
public DefaultNettyHttpBinding(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy)
Method Detail |
---|
public org.apache.camel.Message toCamelMessage(org.jboss.netty.handler.codec.http.HttpRequest request, org.apache.camel.Exchange exchange, NettyHttpConfiguration configuration) throws Exception
NettyHttpBinding
HttpRequest
to Camel Message
.
Will use NettyHttpBinding.populateCamelHeaders(org.jboss.netty.handler.codec.http.HttpRequest, java.util.Map, org.apache.camel.Exchange, NettyHttpConfiguration)
for populating the headers.
toCamelMessage
in interface NettyHttpBinding
request
- the netty http requestexchange
- the exchange that should contain the returned message.configuration
- the endpoint configuration
Exception
- is thrown if error during bindingpublic void populateCamelHeaders(org.jboss.netty.handler.codec.http.HttpRequest request, Map<String,Object> headers, org.apache.camel.Exchange exchange, NettyHttpConfiguration configuration) throws Exception
NettyHttpBinding
HttpRequest
to Camel headers as a Map
.
populateCamelHeaders
in interface NettyHttpBinding
request
- the netty http requestheaders
- the Camel headers that should be populatedexchange
- the exchange that should contain the returned message.configuration
- the endpoint configuration
Exception
- is thrown if error during bindingprotected String shouldUrlDecodeHeader(NettyHttpConfiguration configuration, String headerName, Object value, String charset) throws UnsupportedEncodingException
configuration
- the configurationheaderName
- the header namevalue
- the current header valuecharset
- the charset to use for decoding
UnsupportedEncodingException
- is thrown if error decoding.public org.apache.camel.Message toCamelMessage(org.jboss.netty.handler.codec.http.HttpResponse response, org.apache.camel.Exchange exchange, NettyHttpConfiguration configuration) throws Exception
NettyHttpBinding
HttpResponse
to Camel Message
.
Will use NettyHttpBinding.populateCamelHeaders(org.jboss.netty.handler.codec.http.HttpResponse, java.util.Map, org.apache.camel.Exchange, NettyHttpConfiguration)
for populating the headers.
toCamelMessage
in interface NettyHttpBinding
response
- the netty http responseexchange
- the exchange that should contain the returned message.configuration
- the endpoint configuration
Exception
- is thrown if error during bindingpublic void populateCamelHeaders(org.jboss.netty.handler.codec.http.HttpResponse response, Map<String,Object> headers, org.apache.camel.Exchange exchange, NettyHttpConfiguration configuration) throws Exception
NettyHttpBinding
HttpResponse
to Camel headers as a Map
.
populateCamelHeaders
in interface NettyHttpBinding
response
- the netty http responseheaders
- the Camel headers that should be populatedexchange
- the exchange that should contain the returned message.configuration
- the endpoint configuration
Exception
- is thrown if error during bindingpublic org.jboss.netty.handler.codec.http.HttpResponse toNettyResponse(org.apache.camel.Message message, NettyHttpConfiguration configuration) throws Exception
NettyHttpBinding
Message
to Netty HttpResponse
.
toNettyResponse
in interface NettyHttpBinding
message
- the Camel messageconfiguration
- the endpoint configuration
Exception
- is thrown if error during bindingpublic org.jboss.netty.handler.codec.http.HttpRequest toNettyRequest(org.apache.camel.Message message, String uri, NettyHttpConfiguration configuration) throws Exception
NettyHttpBinding
Message
to Netty HttpRequest
.
toNettyRequest
in interface NettyHttpBinding
message
- the Camel messageuri
- the uri which is the intended uri to call, though the message may override the uriconfiguration
- the endpoint configuration
Exception
- is thrown if error during bindingpublic org.apache.camel.spi.HeaderFilterStrategy getHeaderFilterStrategy()
NettyHttpBinding
getHeaderFilterStrategy
in interface NettyHttpBinding
public void setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy)
NettyHttpBinding
setHeaderFilterStrategy
in interface NettyHttpBinding
headerFilterStrategy
- the custom strategy
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |