Package org.apache.qpid.jms.transports
Class TransportOptions
- java.lang.Object
-
- org.apache.qpid.jms.transports.TransportOptions
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_CONNECT_TIMEOUTstatic StringDEFAULT_CONTEXT_PROTOCOLstatic List<String>DEFAULT_DISABLED_PROTOCOLSstatic intDEFAULT_LOCAL_PORTstatic intDEFAULT_RECEIVE_BUFFER_SIZEstatic intDEFAULT_SEND_BUFFER_SIZEstatic intDEFAULT_SHARED_EVENT_LOOP_THREADSstatic intDEFAULT_SO_LINGERstatic intDEFAULT_SO_TIMEOUTstatic intDEFAULT_SSL_PORTstatic StringDEFAULT_STORE_TYPEstatic booleanDEFAULT_TCP_KEEP_ALIVEstatic booleanDEFAULT_TCP_NO_DELAYstatic intDEFAULT_TCP_PORTstatic booleanDEFAULT_TRACE_BYTESstatic intDEFAULT_TRAFFIC_CLASSstatic booleanDEFAULT_TRUST_ALLstatic booleanDEFAULT_USE_EPOLLstatic booleanDEFAULT_USE_KQUEUEstatic booleanDEFAULT_USE_OPENSSLstatic booleanDEFAULT_VERIFY_HOST
-
Constructor Summary
Constructors Constructor Description TransportOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TransportOptionsclone()protected TransportOptionscopyOptions(TransportOptions copy)intgetConnectTimeout()StringgetContextProtocol()intgetDefaultSslPort()intgetDefaultTcpPort()String[]getDisabledCipherSuites()String[]getDisabledProtocols()String[]getEnabledCipherSuites()String[]getEnabledProtocols()Map<String,String>getHttpHeaders()StringgetKeyAlias()StringgetKeyStoreLocation()StringgetKeyStorePassword()StringgetKeyStoreType()StringgetLocalAddress()intgetLocalPort()<T> Supplier<T>getProxyHandlerSupplier()intgetReceiveBufferSize()intgetSendBufferSize()intgetSharedEventLoopThreads()intgetSoLinger()intgetSoTimeout()SSLContextgetSslContextOverride()intgetTrafficClass()StringgetTrustStoreLocation()StringgetTrustStorePassword()StringgetTrustStoreType()booleanisTcpKeepAlive()booleanisTcpNoDelay()booleanisTraceBytes()booleanisTrustAll()booleanisUseEpoll()booleanisUseKQueue()booleanisUseOpenSSL()booleanisVerifyHost()voidsetConnectTimeout(int connectTimeout)voidsetContextProtocol(String contextProtocol)The protocol value to use when creating an SSLContext via SSLContext.getInstance(protocol).voidsetDefaultSslPort(int defaultSslPort)voidsetDefaultTcpPort(int defaultTcpPort)voidsetDisabledCipherSuites(String[] disabledCipherSuites)voidsetDisabledProtocols(String[] disabledProtocols)The protocols to be disable.voidsetEnabledCipherSuites(String[] enabledCipherSuites)voidsetEnabledProtocols(String[] enabledProtocols)The protocols to be set as enabled.voidsetKeyAlias(String keyAlias)voidsetKeyStoreLocation(String keyStoreLocation)Sets the location on disk of the key store to use.voidsetKeyStorePassword(String keyStorePassword)voidsetKeyStoreType(String keyStoreType)voidsetLocalAddress(String localAddress)voidsetLocalPort(int localPort)<T> voidsetProxyHandlerSupplier(Supplier<T> proxyHandlerFactory)voidsetReceiveBufferSize(int receiveBufferSize)Sets the receive buffer size in bytes, the value must be greater than zero or anIllegalArgumentExceptionwill be thrown.voidsetSendBufferSize(int sendBufferSize)Sets the send buffer size in bytes, the value must be greater than zero or anIllegalArgumentExceptionwill be thrown.voidsetSharedEventLoopThreads(int numThreads)voidsetSoLinger(int soLinger)voidsetSoTimeout(int soTimeout)voidsetSslContextOverride(SSLContext sslContextOverride)voidsetStoreType(String storeType)voidsetTcpKeepAlive(boolean keepAlive)voidsetTcpNoDelay(boolean tcpNoDelay)voidsetTraceBytes(boolean traceBytes)Determines if the transport should add a logger for bytes in / outvoidsetTrafficClass(int trafficClass)Sets the traffic class value used by the TCP connection, valid range is between 0 and 255.voidsetTrustAll(boolean trustAll)voidsetTrustStoreLocation(String trustStoreLocation)voidsetTrustStorePassword(String trustStorePassword)voidsetTrustStoreType(String trustStoreType)voidsetUseEpoll(boolean useEpoll)Determines if the netty epoll transport can be used if available on this platform.voidsetUseKQueue(boolean useKQueue)Determines if the netty kqueue transport can be used if available on this platform.voidsetUseOpenSSL(boolean useOpenSSL)voidsetVerifyHost(boolean verifyHost)
-
-
-
Field Detail
-
DEFAULT_SEND_BUFFER_SIZE
public static final int DEFAULT_SEND_BUFFER_SIZE
- See Also:
- Constant Field Values
-
DEFAULT_RECEIVE_BUFFER_SIZE
public static final int DEFAULT_RECEIVE_BUFFER_SIZE
- See Also:
- Constant Field Values
-
DEFAULT_TRAFFIC_CLASS
public static final int DEFAULT_TRAFFIC_CLASS
- See Also:
- Constant Field Values
-
DEFAULT_TCP_NO_DELAY
public static final boolean DEFAULT_TCP_NO_DELAY
- See Also:
- Constant Field Values
-
DEFAULT_TCP_KEEP_ALIVE
public static final boolean DEFAULT_TCP_KEEP_ALIVE
- See Also:
- Constant Field Values
-
DEFAULT_SO_LINGER
public static final int DEFAULT_SO_LINGER
- See Also:
- Constant Field Values
-
DEFAULT_SO_TIMEOUT
public static final int DEFAULT_SO_TIMEOUT
- See Also:
- Constant Field Values
-
DEFAULT_CONNECT_TIMEOUT
public static final int DEFAULT_CONNECT_TIMEOUT
- See Also:
- Constant Field Values
-
DEFAULT_TCP_PORT
public static final int DEFAULT_TCP_PORT
- See Also:
- Constant Field Values
-
DEFAULT_SHARED_EVENT_LOOP_THREADS
public static final int DEFAULT_SHARED_EVENT_LOOP_THREADS
- See Also:
- Constant Field Values
-
DEFAULT_USE_EPOLL
public static final boolean DEFAULT_USE_EPOLL
- See Also:
- Constant Field Values
-
DEFAULT_USE_KQUEUE
public static final boolean DEFAULT_USE_KQUEUE
- See Also:
- Constant Field Values
-
DEFAULT_TRACE_BYTES
public static final boolean DEFAULT_TRACE_BYTES
- See Also:
- Constant Field Values
-
DEFAULT_STORE_TYPE
public static final String DEFAULT_STORE_TYPE
- See Also:
- Constant Field Values
-
DEFAULT_CONTEXT_PROTOCOL
public static final String DEFAULT_CONTEXT_PROTOCOL
- See Also:
- Constant Field Values
-
DEFAULT_TRUST_ALL
public static final boolean DEFAULT_TRUST_ALL
- See Also:
- Constant Field Values
-
DEFAULT_VERIFY_HOST
public static final boolean DEFAULT_VERIFY_HOST
- See Also:
- Constant Field Values
-
DEFAULT_SSL_PORT
public static final int DEFAULT_SSL_PORT
- See Also:
- Constant Field Values
-
DEFAULT_USE_OPENSSL
public static final boolean DEFAULT_USE_OPENSSL
- See Also:
- Constant Field Values
-
DEFAULT_LOCAL_PORT
public static final int DEFAULT_LOCAL_PORT
- See Also:
- Constant Field Values
-
-
Method Detail
-
clone
public TransportOptions clone()
-
getSendBufferSize
public int getSendBufferSize()
- Returns:
- the currently set send buffer size in bytes.
-
setSendBufferSize
public void setSendBufferSize(int sendBufferSize)
Sets the send buffer size in bytes, the value must be greater than zero or anIllegalArgumentExceptionwill be thrown.- Parameters:
sendBufferSize- the new send buffer size for the TCP Transport.- Throws:
IllegalArgumentException- if the value given is not in the valid range.
-
getReceiveBufferSize
public int getReceiveBufferSize()
- Returns:
- the currently configured receive buffer size in bytes.
-
setReceiveBufferSize
public void setReceiveBufferSize(int receiveBufferSize)
Sets the receive buffer size in bytes, the value must be greater than zero or anIllegalArgumentExceptionwill be thrown.- Parameters:
receiveBufferSize- the new receive buffer size for the TCP Transport.- Throws:
IllegalArgumentException- if the value given is not in the valid range.
-
getTrafficClass
public int getTrafficClass()
- Returns:
- the currently configured traffic class value.
-
setTrafficClass
public void setTrafficClass(int trafficClass)
Sets the traffic class value used by the TCP connection, valid range is between 0 and 255.- Parameters:
trafficClass- the new traffic class value.- Throws:
IllegalArgumentException- if the value given is not in the valid range.
-
getSoTimeout
public int getSoTimeout()
-
setSoTimeout
public void setSoTimeout(int soTimeout)
-
isTcpNoDelay
public boolean isTcpNoDelay()
-
setTcpNoDelay
public void setTcpNoDelay(boolean tcpNoDelay)
-
getSoLinger
public int getSoLinger()
-
setSoLinger
public void setSoLinger(int soLinger)
-
isTcpKeepAlive
public boolean isTcpKeepAlive()
-
setTcpKeepAlive
public void setTcpKeepAlive(boolean keepAlive)
-
setSharedEventLoopThreads
public void setSharedEventLoopThreads(int numThreads)
-
getSharedEventLoopThreads
public int getSharedEventLoopThreads()
-
getConnectTimeout
public int getConnectTimeout()
-
setConnectTimeout
public void setConnectTimeout(int connectTimeout)
-
getDefaultTcpPort
public int getDefaultTcpPort()
-
setDefaultTcpPort
public void setDefaultTcpPort(int defaultTcpPort)
-
getLocalAddress
public String getLocalAddress()
-
setLocalAddress
public void setLocalAddress(String localAddress)
-
getLocalPort
public int getLocalPort()
-
setLocalPort
public void setLocalPort(int localPort)
-
isUseEpoll
public boolean isUseEpoll()
- Returns:
- true if the netty epoll transport can be used if available on this platform.
-
setUseEpoll
public void setUseEpoll(boolean useEpoll)
Determines if the netty epoll transport can be used if available on this platform.- Parameters:
useEpoll- should use of available epoll transport be used.
-
isUseKQueue
public boolean isUseKQueue()
- Returns:
- true if the netty kqueue transport can be used if available on this platform.
-
setUseKQueue
public void setUseKQueue(boolean useKQueue)
Determines if the netty kqueue transport can be used if available on this platform.- Parameters:
useKQueue- should use of available kqueue transport be used.
-
isTraceBytes
public boolean isTraceBytes()
- Returns:
- true if the transport should enable byte tracing
-
setTraceBytes
public void setTraceBytes(boolean traceBytes)
Determines if the transport should add a logger for bytes in / out- Parameters:
traceBytes- should the transport log the bytes in and out.
-
getKeyStoreLocation
public String getKeyStoreLocation()
- Returns:
- the keyStoreLocation currently configured.
-
setKeyStoreLocation
public void setKeyStoreLocation(String keyStoreLocation)
Sets the location on disk of the key store to use.- Parameters:
keyStoreLocation- the keyStoreLocation to use to create the key manager.
-
getKeyStorePassword
public String getKeyStorePassword()
- Returns:
- the keyStorePassword
-
setKeyStorePassword
public void setKeyStorePassword(String keyStorePassword)
- Parameters:
keyStorePassword- the keyStorePassword to set
-
getTrustStoreLocation
public String getTrustStoreLocation()
- Returns:
- the trustStoreLocation
-
setTrustStoreLocation
public void setTrustStoreLocation(String trustStoreLocation)
- Parameters:
trustStoreLocation- the trustStoreLocation to set
-
getTrustStorePassword
public String getTrustStorePassword()
- Returns:
- the trustStorePassword
-
setTrustStorePassword
public void setTrustStorePassword(String trustStorePassword)
- Parameters:
trustStorePassword- the trustStorePassword to set
-
setStoreType
public void setStoreType(String storeType)
- Parameters:
storeType- the format that the store files are encoded in.
-
getKeyStoreType
public String getKeyStoreType()
- Returns:
- the keyStoreType
-
setKeyStoreType
public void setKeyStoreType(String keyStoreType)
- Parameters:
keyStoreType- the format that the keyStore file is encoded in
-
getTrustStoreType
public String getTrustStoreType()
- Returns:
- the trustStoreType
-
setTrustStoreType
public void setTrustStoreType(String trustStoreType)
- Parameters:
trustStoreType- the format that the trustStore file is encoded in
-
getEnabledCipherSuites
public String[] getEnabledCipherSuites()
- Returns:
- the enabledCipherSuites
-
setEnabledCipherSuites
public void setEnabledCipherSuites(String[] enabledCipherSuites)
- Parameters:
enabledCipherSuites- the enabledCipherSuites to set
-
getDisabledCipherSuites
public String[] getDisabledCipherSuites()
- Returns:
- the disabledCipherSuites
-
setDisabledCipherSuites
public void setDisabledCipherSuites(String[] disabledCipherSuites)
- Parameters:
disabledCipherSuites- the disabledCipherSuites to set
-
getEnabledProtocols
public String[] getEnabledProtocols()
- Returns:
- the enabledProtocols or null if the defaults should be used
-
setEnabledProtocols
public void setEnabledProtocols(String[] enabledProtocols)
The protocols to be set as enabled.- Parameters:
enabledProtocols- the enabled protocols to set, or null if the defaults should be used.
-
getDisabledProtocols
public String[] getDisabledProtocols()
- Returns:
- the protocols to disable or null if none should be
-
setDisabledProtocols
public void setDisabledProtocols(String[] disabledProtocols)
The protocols to be disable.- Parameters:
disabledProtocols- the protocols to disable, or null if none should be.
-
getContextProtocol
public String getContextProtocol()
- Returns:
- the context protocol to use
-
setContextProtocol
public void setContextProtocol(String contextProtocol)
The protocol value to use when creating an SSLContext via SSLContext.getInstance(protocol).- Parameters:
contextProtocol- the context protocol to use.
-
isTrustAll
public boolean isTrustAll()
- Returns:
- the trustAll
-
setTrustAll
public void setTrustAll(boolean trustAll)
- Parameters:
trustAll- the trustAll to set
-
isVerifyHost
public boolean isVerifyHost()
- Returns:
- the verifyHost
-
setVerifyHost
public void setVerifyHost(boolean verifyHost)
- Parameters:
verifyHost- the verifyHost to set
-
getKeyAlias
public String getKeyAlias()
- Returns:
- the key alias
-
setKeyAlias
public void setKeyAlias(String keyAlias)
- Parameters:
keyAlias- the key alias to use
-
getDefaultSslPort
public int getDefaultSslPort()
-
setDefaultSslPort
public void setDefaultSslPort(int defaultSslPort)
-
setSslContextOverride
public void setSslContextOverride(SSLContext sslContextOverride)
-
getSslContextOverride
public SSLContext getSslContextOverride()
-
getProxyHandlerSupplier
public <T> Supplier<T> getProxyHandlerSupplier()
-
setProxyHandlerSupplier
public <T> void setProxyHandlerSupplier(Supplier<T> proxyHandlerFactory)
-
isUseOpenSSL
public boolean isUseOpenSSL()
- Returns:
- true if the netty OpenSSL support can be used if available.
-
setUseOpenSSL
public void setUseOpenSSL(boolean useOpenSSL)
- Parameters:
useOpenSSL- Configure if the transport should attempt to use OpenSSL support if available.
-
copyOptions
protected TransportOptions copyOptions(TransportOptions copy)
-
-