Interface NettyHttpBinding
-
- All Known Implementing Classes:
DefaultNettyHttpBinding
,RestNettyHttpBinding
public interface NettyHttpBinding
To bind Netty http codec with the CamelMessage
api.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.apache.camel.spi.HeaderFilterStrategy
getHeaderFilterStrategy()
Gets the header filter strategyvoid
populateCamelHeaders(io.netty.handler.codec.http.HttpRequest request, Map<String,Object> headers, org.apache.camel.Exchange exchange, NettyHttpConfiguration configuration)
Binds from NettyHttpRequest
to Camel headers as aMap
.void
populateCamelHeaders(io.netty.handler.codec.http.HttpResponse response, Map<String,Object> headers, org.apache.camel.Exchange exchange, NettyHttpConfiguration configuration)
Binds from NettyHttpResponse
to Camel headers as aMap
.void
setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy)
Sets the header filter strategy to use.org.apache.camel.Message
toCamelMessage(io.netty.handler.codec.http.FullHttpRequest request, org.apache.camel.Exchange exchange, NettyHttpConfiguration configuration)
Binds from NettyHttpRequest
to CamelMessage
.org.apache.camel.Message
toCamelMessage(io.netty.handler.codec.http.FullHttpResponse response, org.apache.camel.Exchange exchange, NettyHttpConfiguration configuration)
Binds from NettyHttpResponse
to CamelMessage
.org.apache.camel.Message
toCamelMessage(InboundStreamHttpRequest request, org.apache.camel.Exchange exchange, NettyHttpConfiguration configuration)
Binds from NettyInboundStreamHttpRequest
to CamelMessage
.org.apache.camel.Message
toCamelMessage(InboundStreamHttpResponse response, org.apache.camel.Exchange exchange, NettyHttpConfiguration configuration)
Binds from NettyInboundStreamHttpResponse
to CamelMessage
.io.netty.handler.codec.http.HttpRequest
toNettyRequest(org.apache.camel.Message message, String uri, NettyHttpConfiguration configuration)
Binds from CamelMessage
to NettyHttpRequest
.io.netty.handler.codec.http.HttpResponse
toNettyResponse(org.apache.camel.Message message, NettyHttpConfiguration configuration)
Binds from CamelMessage
to NettyHttpResponse
.
-
-
-
Method Detail
-
toCamelMessage
org.apache.camel.Message toCamelMessage(io.netty.handler.codec.http.FullHttpRequest request, org.apache.camel.Exchange exchange, NettyHttpConfiguration configuration) throws Exception
Binds from NettyHttpRequest
to CamelMessage
. Will use the populateCamelHeaders method for populating the headers.- Parameters:
request
- the netty http requestexchange
- the exchange that should contain the returned message.configuration
- the endpoint configuration- Returns:
- the message to store on the given exchange
- Throws:
Exception
- is thrown if error during binding
-
toCamelMessage
org.apache.camel.Message toCamelMessage(InboundStreamHttpRequest request, org.apache.camel.Exchange exchange, NettyHttpConfiguration configuration) throws Exception
Binds from NettyInboundStreamHttpRequest
to CamelMessage
.- Parameters:
request
- the netty http requestexchange
- the exchange that should contain the returned message.configuration
- the endpoint configuration- Returns:
- the message to store on the given exchange
- Throws:
Exception
- is thrown if error during binding
-
populateCamelHeaders
void populateCamelHeaders(io.netty.handler.codec.http.HttpRequest request, Map<String,Object> headers, org.apache.camel.Exchange exchange, NettyHttpConfiguration configuration) throws Exception
Binds from NettyHttpRequest
to Camel headers as aMap
. Will use the populateCamelHeaders method for populating the headers.- Parameters:
request
- the netty http requestheaders
- the Camel headers that should be populatedexchange
- the exchange that should contain the returned message.configuration
- the endpoint configuration- Throws:
Exception
- is thrown if error during binding
-
toCamelMessage
org.apache.camel.Message toCamelMessage(io.netty.handler.codec.http.FullHttpResponse response, org.apache.camel.Exchange exchange, NettyHttpConfiguration configuration) throws Exception
Binds from NettyHttpResponse
to CamelMessage
. Will use the populateCamelHeaders method for populating the headers.- Parameters:
response
- the netty http responseexchange
- the exchange that should contain the returned message.configuration
- the endpoint configuration- Returns:
- the message to store on the given exchange
- Throws:
Exception
- is thrown if error during binding
-
toCamelMessage
org.apache.camel.Message toCamelMessage(InboundStreamHttpResponse response, org.apache.camel.Exchange exchange, NettyHttpConfiguration configuration) throws Exception
Binds from NettyInboundStreamHttpResponse
to CamelMessage
. Will use the populateCamelHeaders method for populating the headers.- Parameters:
response
- the netty http responseexchange
- the exchange that should contain the returned message.configuration
- the endpoint configuration- Returns:
- the message to store on the given exchange
- Throws:
Exception
- is thrown if error during binding
-
populateCamelHeaders
void populateCamelHeaders(io.netty.handler.codec.http.HttpResponse response, Map<String,Object> headers, org.apache.camel.Exchange exchange, NettyHttpConfiguration configuration) throws Exception
Binds from NettyHttpResponse
to Camel headers as aMap
.- Parameters:
response
- the netty http responseheaders
- the Camel headers that should be populatedexchange
- the exchange that should contain the returned message.configuration
- the endpoint configuration- Throws:
Exception
- is thrown if error during binding
-
toNettyResponse
io.netty.handler.codec.http.HttpResponse toNettyResponse(org.apache.camel.Message message, NettyHttpConfiguration configuration) throws Exception
Binds from CamelMessage
to NettyHttpResponse
.- Parameters:
message
- the Camel messageconfiguration
- the endpoint configuration- Returns:
- the http response
- Throws:
Exception
- is thrown if error during binding
-
toNettyRequest
io.netty.handler.codec.http.HttpRequest toNettyRequest(org.apache.camel.Message message, String uri, NettyHttpConfiguration configuration) throws Exception
Binds from CamelMessage
to NettyHttpRequest
.- Parameters:
message
- the Camel messageuri
- the uri which is the intended uri to call, though the message may override the uriconfiguration
- the endpoint configuration- Returns:
- the http request
- Throws:
Exception
- is thrown if error during binding
-
getHeaderFilterStrategy
org.apache.camel.spi.HeaderFilterStrategy getHeaderFilterStrategy()
Gets the header filter strategy- Returns:
- the strategy
-
setHeaderFilterStrategy
void setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy)
Sets the header filter strategy to use.- Parameters:
headerFilterStrategy
- the custom strategy
-
-