com.ning.http.client.providers.netty
Class NettyAsyncHttpProviderConfig

java.lang.Object
  extended by com.ning.http.client.providers.netty.NettyAsyncHttpProviderConfig
All Implemented Interfaces:
AsyncHttpProviderConfig<String,Object>

public class NettyAsyncHttpProviderConfig
extends Object
implements AsyncHttpProviderConfig<String,Object>

This class can be used to pass Netty's internal configuration options. See Netty documentation for more information.


Field Summary
static String BOSS_EXECUTOR_SERVICE
          Allow configuring the Netty's boss executor service.
static String DISABLE_NESTED_REQUEST
          Allow nested request from any AsyncHandler
static String EXECUTE_ASYNC_CONNECT
          Execute the connect operation asynchronously.
static String HTTP_CLIENT_CODEC_MAX_CHUNK_SIZE
           
static String HTTP_CLIENT_CODEC_MAX_HEADER_SIZE
           
static String HTTP_CLIENT_CODEC_MAX_INITIAL_LINE_LENGTH
          Allow configuring the Netty's HttpClientCodec.
static String HTTPS_CLIENT_CODEC_MAX_CHUNK_SIZE
           
static String HTTPS_CLIENT_CODEC_MAX_HEADER_SIZE
           
static String HTTPS_CLIENT_CODEC_MAX_INITIAL_LINE_LENGTH
          Allow configuring the Netty's HttpClientCodec.
static String REUSE_ADDRESS
          See Socket.setReuseAddress(boolean)
static String SOCKET_CHANNEL_FACTORY
          Allow configuring the Netty's socket channel factory.
static String USE_BLOCKING_IO
          Use Netty's blocking IO stategy.
static String USE_DIRECT_BYTEBUFFER
          Use direct ByteBuffer
 
Constructor Summary
NettyAsyncHttpProviderConfig()
           
 
Method Summary
 NettyAsyncHttpProviderConfig addProperty(String name, Object value)
          Add a property that will be used when the AsyncHttpClient initialize its AsyncHttpProvider
 org.jboss.netty.util.HashedWheelTimer getHashedWheelTimer()
           
 Object getProperty(String name)
          Return the value associated with the property's name
<T> T
getProperty(String name, Class<T> type, T defaultValue)
          Return the value associated with the property's name
 boolean isDisableZeroCopy()
           
 Set<Map.Entry<String,Object>> propertiesSet()
          Return the curent entry set.
 Object removeProperty(String name)
          Remove the value associated with the property's name
 void setDisableZeroCopy(boolean disableZeroCopy)
           
 void setHashedWheelTimer(org.jboss.netty.util.HashedWheelTimer hashedWheelTimer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USE_BLOCKING_IO

public static final String USE_BLOCKING_IO
Use Netty's blocking IO stategy.

See Also:
Constant Field Values

USE_DIRECT_BYTEBUFFER

public static final String USE_DIRECT_BYTEBUFFER
Use direct ByteBuffer

See Also:
Constant Field Values

EXECUTE_ASYNC_CONNECT

public static final String EXECUTE_ASYNC_CONNECT
Execute the connect operation asynchronously.

See Also:
Constant Field Values

DISABLE_NESTED_REQUEST

public static final String DISABLE_NESTED_REQUEST
Allow nested request from any AsyncHandler

See Also:
Constant Field Values

BOSS_EXECUTOR_SERVICE

public static final String BOSS_EXECUTOR_SERVICE
Allow configuring the Netty's boss executor service.

See Also:
Constant Field Values

REUSE_ADDRESS

public static final String REUSE_ADDRESS
See Socket.setReuseAddress(boolean)

See Also:
Constant Field Values

HTTP_CLIENT_CODEC_MAX_INITIAL_LINE_LENGTH

public static final String HTTP_CLIENT_CODEC_MAX_INITIAL_LINE_LENGTH
Allow configuring the Netty's HttpClientCodec.

See Also:
Constant Field Values

HTTP_CLIENT_CODEC_MAX_HEADER_SIZE

public static final String HTTP_CLIENT_CODEC_MAX_HEADER_SIZE
See Also:
Constant Field Values

HTTP_CLIENT_CODEC_MAX_CHUNK_SIZE

public static final String HTTP_CLIENT_CODEC_MAX_CHUNK_SIZE
See Also:
Constant Field Values

HTTPS_CLIENT_CODEC_MAX_INITIAL_LINE_LENGTH

public static final String HTTPS_CLIENT_CODEC_MAX_INITIAL_LINE_LENGTH
Allow configuring the Netty's HttpClientCodec.

See Also:
Constant Field Values

HTTPS_CLIENT_CODEC_MAX_HEADER_SIZE

public static final String HTTPS_CLIENT_CODEC_MAX_HEADER_SIZE
See Also:
Constant Field Values

HTTPS_CLIENT_CODEC_MAX_CHUNK_SIZE

public static final String HTTPS_CLIENT_CODEC_MAX_CHUNK_SIZE
See Also:
Constant Field Values

SOCKET_CHANNEL_FACTORY

public static final String SOCKET_CHANNEL_FACTORY
Allow configuring the Netty's socket channel factory.

See Also:
Constant Field Values
Constructor Detail

NettyAsyncHttpProviderConfig

public NettyAsyncHttpProviderConfig()
Method Detail

addProperty

public NettyAsyncHttpProviderConfig addProperty(String name,
                                                Object value)
Add a property that will be used when the AsyncHttpClient initialize its AsyncHttpProvider

Specified by:
addProperty in interface AsyncHttpProviderConfig<String,Object>
Parameters:
name - the name of the property
value - the value of the property
Returns:
this instance of AsyncHttpProviderConfig

getProperty

public Object getProperty(String name)
Return the value associated with the property's name

Specified by:
getProperty in interface AsyncHttpProviderConfig<String,Object>
Parameters:
name -
Returns:
this instance of AsyncHttpProviderConfig

getProperty

public <T> T getProperty(String name,
                         Class<T> type,
                         T defaultValue)
Return the value associated with the property's name

Parameters:
name -
Returns:
this instance of AsyncHttpProviderConfig

removeProperty

public Object removeProperty(String name)
Remove the value associated with the property's name

Specified by:
removeProperty in interface AsyncHttpProviderConfig<String,Object>
Parameters:
name -
Returns:
true if removed

propertiesSet

public Set<Map.Entry<String,Object>> propertiesSet()
Return the curent entry set.

Specified by:
propertiesSet in interface AsyncHttpProviderConfig<String,Object>
Returns:
a the curent entry set.

setDisableZeroCopy

public void setDisableZeroCopy(boolean disableZeroCopy)

isDisableZeroCopy

public boolean isDisableZeroCopy()

getHashedWheelTimer

public org.jboss.netty.util.HashedWheelTimer getHashedWheelTimer()

setHashedWheelTimer

public void setHashedWheelTimer(org.jboss.netty.util.HashedWheelTimer hashedWheelTimer)


Copyright © 2014. All Rights Reserved.