Class NettyHttpConverter

java.lang.Object
org.apache.camel.component.netty.http.NettyHttpConverter

@Converter(generateLoader=true) public final class NettyHttpConverter extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static Object
    convertToHttpRequest(Class<?> type, org.apache.camel.Exchange exchange, Object value, org.apache.camel.spi.TypeConverterRegistry registry)
    A fallback converter that allows us to easily call Java beans and use the raw Netty HttpRequest as parameter types.
    static Object
    convertToHttpResponse(Class<?> type, org.apache.camel.Exchange exchange, Object value, org.apache.camel.spi.TypeConverterRegistry registry)
    A fallback converter that allows us to easily call Java beans and use the raw Netty HttpRequest as parameter types.
    static io.netty.buffer.ByteBuf
    toByteBuf(NettyChannelBufferStreamCache cache, org.apache.camel.Exchange exchange)
     
    static byte[]
    toBytes(io.netty.handler.codec.http.FullHttpResponse response, org.apache.camel.Exchange exchange)
     
    toInputStream(io.netty.handler.codec.http.FullHttpResponse response, org.apache.camel.Exchange exchange)
     
    static String
    toString(io.netty.handler.codec.http.FullHttpResponse response, org.apache.camel.Exchange exchange)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • convertToHttpRequest

      @Converter(fallback=true) public static Object convertToHttpRequest(Class<?> type, org.apache.camel.Exchange exchange, Object value, org.apache.camel.spi.TypeConverterRegistry registry)
      A fallback converter that allows us to easily call Java beans and use the raw Netty HttpRequest as parameter types.
    • convertToHttpResponse

      @Converter(fallback=true) public static Object convertToHttpResponse(Class<?> type, org.apache.camel.Exchange exchange, Object value, org.apache.camel.spi.TypeConverterRegistry registry)
      A fallback converter that allows us to easily call Java beans and use the raw Netty HttpRequest as parameter types.
    • toString

      @Converter public static String toString(io.netty.handler.codec.http.FullHttpResponse response, org.apache.camel.Exchange exchange)
    • toBytes

      @Converter public static byte[] toBytes(io.netty.handler.codec.http.FullHttpResponse response, org.apache.camel.Exchange exchange)
    • toInputStream

      @Converter public static InputStream toInputStream(io.netty.handler.codec.http.FullHttpResponse response, org.apache.camel.Exchange exchange)
    • toByteBuf

      @Converter public static io.netty.buffer.ByteBuf toByteBuf(NettyChannelBufferStreamCache cache, org.apache.camel.Exchange exchange) throws Exception
      Throws:
      Exception