Interface NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointProducerBuilder

  • All Superinterfaces:
    org.apache.camel.builder.EndpointProducerBuilder, org.apache.camel.EndpointProducerResolver
    All Known Subinterfaces:
    NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointBuilder
    Enclosing interface:
    NettyHttpEndpointBuilderFactory

    public static interface NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointProducerBuilder
    extends org.apache.camel.builder.EndpointProducerBuilder
    Advanced builder for endpoint producers for the Netty HTTP component.
    • Method Detail

      • lazyChannelCreation

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointProducerBuilder lazyChannelCreation​(boolean lazyChannelCreation)
        Channels can be lazily created to avoid exceptions, if the remote server is not up and running when the Camel producer is started. The option is a: boolean type. Default: true Group: producer (advanced)
      • okStatusCodeRange

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointProducerBuilder okStatusCodeRange​(String okStatusCodeRange)
        The status codes which are considered a success response. The values are inclusive. Multiple ranges can be defined, separated by comma, e.g. 200-204,209,301-304. Each range must be a single number or from-to with the dash included. The default range is 200-299. The option is a: java.lang.String type. Default: 200-299 Group: producer (advanced)
      • producerPoolEnabled

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointProducerBuilder producerPoolEnabled​(boolean producerPoolEnabled)
        Whether producer pool is enabled or not. Important: If you turn this off then a single shared connection is used for the producer, also if you are doing request/reply. That means there is a potential issue with interleaved responses if replies comes back out-of-order. Therefore you need to have a correlation id in both the request and reply messages so you can properly correlate the replies to the Camel callback that is responsible for continue processing the message in Camel. To do this you need to implement NettyCamelStateCorrelationManager as correlation manager and configure it via the correlationManager option. See also the correlationManager option for more details. The option is a: boolean type. Default: true Group: producer (advanced)
      • producerPoolEnabled

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointProducerBuilder producerPoolEnabled​(String producerPoolEnabled)
        Whether producer pool is enabled or not. Important: If you turn this off then a single shared connection is used for the producer, also if you are doing request/reply. That means there is a potential issue with interleaved responses if replies comes back out-of-order. Therefore you need to have a correlation id in both the request and reply messages so you can properly correlate the replies to the Camel callback that is responsible for continue processing the message in Camel. To do this you need to implement NettyCamelStateCorrelationManager as correlation manager and configure it via the correlationManager option. See also the correlationManager option for more details. The option will be converted to a boolean type. Default: true Group: producer (advanced)
      • producerPoolMaxActive

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointProducerBuilder producerPoolMaxActive​(int producerPoolMaxActive)
        Sets the cap on the number of objects that can be allocated by the pool (checked out to clients, or idle awaiting checkout) at a given time. Use a negative value for no limit. The option is a: int type. Default: -1 Group: producer (advanced)
      • producerPoolMaxActive

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointProducerBuilder producerPoolMaxActive​(String producerPoolMaxActive)
        Sets the cap on the number of objects that can be allocated by the pool (checked out to clients, or idle awaiting checkout) at a given time. Use a negative value for no limit. The option will be converted to a int type. Default: -1 Group: producer (advanced)
      • producerPoolMinEvictableIdle

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointProducerBuilder producerPoolMinEvictableIdle​(long producerPoolMinEvictableIdle)
        Sets the minimum amount of time (value in millis) an object may sit idle in the pool before it is eligible for eviction by the idle object evictor. The option is a: long type. Default: 300000 Group: producer (advanced)
      • producerPoolMinEvictableIdle

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointProducerBuilder producerPoolMinEvictableIdle​(String producerPoolMinEvictableIdle)
        Sets the minimum amount of time (value in millis) an object may sit idle in the pool before it is eligible for eviction by the idle object evictor. The option will be converted to a long type. Default: 300000 Group: producer (advanced)
      • allowSerializedHeaders

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointProducerBuilder allowSerializedHeaders​(boolean allowSerializedHeaders)
        Only used for TCP when transferExchange is true. When set to true, serializable objects in headers and properties will be added to the exchange. Otherwise Camel will exclude any non-serializable objects and log it at WARN level. The option is a: boolean type. Default: false Group: advanced
      • allowSerializedHeaders

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointProducerBuilder allowSerializedHeaders​(String allowSerializedHeaders)
        Only used for TCP when transferExchange is true. When set to true, serializable objects in headers and properties will be added to the exchange. Otherwise Camel will exclude any non-serializable objects and log it at WARN level. The option will be converted to a boolean type. Default: false Group: advanced
      • disableStreamCache

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointProducerBuilder disableStreamCache​(boolean disableStreamCache)
        Determines whether or not the raw input stream from Netty HttpRequest#getContent() or HttpResponset#getContent() is cached or not (Camel will read the stream into a in light-weight memory based Stream caching) cache. By default Camel will cache the Netty input stream to support reading it multiple times to ensure it Camel can retrieve all data from the stream. However you can set this option to true when you for example need to access the raw stream, such as streaming it directly to a file or other persistent store. Mind that if you enable this option, then you cannot read the Netty stream multiple times out of the box, and you would need manually to reset the reader index on the Netty raw stream. Also Netty will auto-close the Netty stream when the Netty HTTP server/HTTP client is done processing, which means that if the asynchronous routing engine is in use then any asynchronous thread that may continue routing the org.apache.camel.Exchange may not be able to read the Netty stream, because Netty has closed it. The option is a: boolean type. Default: false Group: advanced
      • disableStreamCache

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointProducerBuilder disableStreamCache​(String disableStreamCache)
        Determines whether or not the raw input stream from Netty HttpRequest#getContent() or HttpResponset#getContent() is cached or not (Camel will read the stream into a in light-weight memory based Stream caching) cache. By default Camel will cache the Netty input stream to support reading it multiple times to ensure it Camel can retrieve all data from the stream. However you can set this option to true when you for example need to access the raw stream, such as streaming it directly to a file or other persistent store. Mind that if you enable this option, then you cannot read the Netty stream multiple times out of the box, and you would need manually to reset the reader index on the Netty raw stream. Also Netty will auto-close the Netty stream when the Netty HTTP server/HTTP client is done processing, which means that if the asynchronous routing engine is in use then any asynchronous thread that may continue routing the org.apache.camel.Exchange may not be able to read the Netty stream, because Netty has closed it. The option will be converted to a boolean type. Default: false Group: advanced
      • nativeTransport

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointProducerBuilder nativeTransport​(boolean nativeTransport)
        Whether to use native transport instead of NIO. Native transport takes advantage of the host operating system and is only supported on some platforms. You need to add the netty JAR for the host operating system you are using. See more details at: http://netty.io/wiki/native-transports.html. The option is a: boolean type. Default: false Group: advanced
      • nativeTransport

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointProducerBuilder nativeTransport​(String nativeTransport)
        Whether to use native transport instead of NIO. Native transport takes advantage of the host operating system and is only supported on some platforms. You need to add the netty JAR for the host operating system you are using. See more details at: http://netty.io/wiki/native-transports.html. The option will be converted to a boolean type. Default: false Group: advanced
      • options

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointProducerBuilder options​(String key,
                                                                                                 Object value)
        Allows to configure additional netty options using option. as prefix. For example option.child.keepAlive=false to set the netty option child.keepAlive=false. See the Netty documentation for possible options that can be used. The option is a: java.util.Map<java.lang.String, java.lang.Object> type. The option is multivalued, and you can use the options(String, Object) method to add a value (call the method multiple times to set more values). Group: advanced
      • options

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointProducerBuilder options​(Map values)
        Allows to configure additional netty options using option. as prefix. For example option.child.keepAlive=false to set the netty option child.keepAlive=false. See the Netty documentation for possible options that can be used. The option is a: java.util.Map<java.lang.String, java.lang.Object> type. The option is multivalued, and you can use the options(String, Object) method to add a value (call the method multiple times to set more values). Group: advanced
      • transferException

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointProducerBuilder transferException​(boolean transferException)
        If enabled and an Exchange failed processing on the consumer side, and if the caused Exception was send back serialized in the response as a application/x-java-serialized-object content type. On the producer side the exception will be deserialized and thrown as is, instead of the HttpOperationFailedException. The caused exception is required to be serialized. This is by default turned off. If you enable this then be aware that Java will deserialize the incoming data from the request to Java and that can be a potential security risk. The option is a: boolean type. Default: false Group: advanced
      • transferException

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointProducerBuilder transferException​(String transferException)
        If enabled and an Exchange failed processing on the consumer side, and if the caused Exception was send back serialized in the response as a application/x-java-serialized-object content type. On the producer side the exception will be deserialized and thrown as is, instead of the HttpOperationFailedException. The caused exception is required to be serialized. This is by default turned off. If you enable this then be aware that Java will deserialize the incoming data from the request to Java and that can be a potential security risk. The option will be converted to a boolean type. Default: false Group: advanced
      • transferExchange

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointProducerBuilder transferExchange​(boolean transferExchange)
        Only used for TCP. You can transfer the exchange over the wire instead of just the body. The following fields are transferred: In body, Out body, fault body, In headers, Out headers, fault headers, exchange properties, exchange exception. This requires that the objects are serializable. Camel will exclude any non-serializable objects and log it at WARN level. The option is a: boolean type. Default: false Group: advanced
      • transferExchange

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointProducerBuilder transferExchange​(String transferExchange)
        Only used for TCP. You can transfer the exchange over the wire instead of just the body. The following fields are transferred: In body, Out body, fault body, In headers, Out headers, fault headers, exchange properties, exchange exception. This requires that the objects are serializable. Camel will exclude any non-serializable objects and log it at WARN level. The option will be converted to a boolean type. Default: false Group: advanced
      • workerGroup

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointProducerBuilder workerGroup​(Object workerGroup)
        To use a explicit EventLoopGroup as the boss thread pool. For example to share a thread pool with multiple consumers or producers. By default each consumer or producer has their own worker pool with 2 x cpu count core threads. The option is a: io.netty.channel.EventLoopGroup type. Group: advanced
      • workerGroup

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointProducerBuilder workerGroup​(String workerGroup)
        To use a explicit EventLoopGroup as the boss thread pool. For example to share a thread pool with multiple consumers or producers. By default each consumer or producer has their own worker pool with 2 x cpu count core threads. The option will be converted to a io.netty.channel.EventLoopGroup type. Group: advanced