Package org.apache.qpid.jms.transports
Class TransportOptions
java.lang.Object
org.apache.qpid.jms.transports.TransportOptions
- All Implemented Interfaces:
Cloneable
Encapsulates all the Transport options in one configuration object.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final Stringstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final Stringstatic final booleanstatic final booleanstatic final intstatic final booleanstatic final intstatic final booleanstatic final booleanstatic final booleanstatic final booleanstatic final boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()protected TransportOptionscopyOptions(TransportOptions copy) intintintString[]String[]String[]String[]int<T> Supplier<T>intintintintintintbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanvoidsetConnectTimeout(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 Details
-
DEFAULT_SEND_BUFFER_SIZE
public static final int DEFAULT_SEND_BUFFER_SIZE- See Also:
-
DEFAULT_RECEIVE_BUFFER_SIZE
public static final int DEFAULT_RECEIVE_BUFFER_SIZE- See Also:
-
DEFAULT_TRAFFIC_CLASS
public static final int DEFAULT_TRAFFIC_CLASS- See Also:
-
DEFAULT_TCP_NO_DELAY
public static final boolean DEFAULT_TCP_NO_DELAY- See Also:
-
DEFAULT_TCP_KEEP_ALIVE
public static final boolean DEFAULT_TCP_KEEP_ALIVE- See Also:
-
DEFAULT_SO_LINGER
public static final int DEFAULT_SO_LINGER- See Also:
-
DEFAULT_SO_TIMEOUT
public static final int DEFAULT_SO_TIMEOUT- See Also:
-
DEFAULT_CONNECT_TIMEOUT
public static final int DEFAULT_CONNECT_TIMEOUT- See Also:
-
DEFAULT_TCP_PORT
public static final int DEFAULT_TCP_PORT- See Also:
-
DEFAULT_SHARED_EVENT_LOOP_THREADS
public static final int DEFAULT_SHARED_EVENT_LOOP_THREADS- See Also:
-
DEFAULT_USE_EPOLL
public static final boolean DEFAULT_USE_EPOLL- See Also:
-
DEFAULT_USE_KQUEUE
public static final boolean DEFAULT_USE_KQUEUE- See Also:
-
DEFAULT_TRACE_BYTES
public static final boolean DEFAULT_TRACE_BYTES- See Also:
-
DEFAULT_STORE_TYPE
- See Also:
-
DEFAULT_CONTEXT_PROTOCOL
- See Also:
-
DEFAULT_TRUST_ALL
public static final boolean DEFAULT_TRUST_ALL- See Also:
-
DEFAULT_VERIFY_HOST
public static final boolean DEFAULT_VERIFY_HOST- See Also:
-
DEFAULT_DISABLED_PROTOCOLS
-
DEFAULT_SSL_PORT
public static final int DEFAULT_SSL_PORT- See Also:
-
DEFAULT_USE_OPENSSL
public static final boolean DEFAULT_USE_OPENSSL- See Also:
-
DEFAULT_LOCAL_PORT
public static final int DEFAULT_LOCAL_PORT- See Also:
-
-
Constructor Details
-
TransportOptions
public TransportOptions()
-
-
Method Details
-
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) -
getConnectTimeout
public int getConnectTimeout() -
setConnectTimeout
public void setConnectTimeout(int connectTimeout) -
getDefaultTcpPort
public int getDefaultTcpPort() -
setDefaultTcpPort
public void setDefaultTcpPort(int defaultTcpPort) -
getLocalAddress
-
setLocalAddress
-
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
- Returns:
- the keyStoreLocation currently configured.
-
setKeyStoreLocation
Sets the location on disk of the key store to use.- Parameters:
keyStoreLocation- the keyStoreLocation to use to create the key manager.
-
getKeyStorePassword
- Returns:
- the keyStorePassword
-
setKeyStorePassword
- Parameters:
keyStorePassword- the keyStorePassword to set
-
getTrustStoreLocation
- Returns:
- the trustStoreLocation
-
setTrustStoreLocation
- Parameters:
trustStoreLocation- the trustStoreLocation to set
-
getTrustStorePassword
- Returns:
- the trustStorePassword
-
setTrustStorePassword
- Parameters:
trustStorePassword- the trustStorePassword to set
-
setStoreType
- Parameters:
storeType- the format that the store files are encoded in.
-
getKeyStoreType
- Returns:
- the keyStoreType
-
setKeyStoreType
- Parameters:
keyStoreType- the format that the keyStore file is encoded in
-
getTrustStoreType
- Returns:
- the trustStoreType
-
setTrustStoreType
- Parameters:
trustStoreType- the format that the trustStore file is encoded in
-
getEnabledCipherSuites
- Returns:
- the enabledCipherSuites
-
setEnabledCipherSuites
- Parameters:
enabledCipherSuites- the enabledCipherSuites to set
-
getDisabledCipherSuites
- Returns:
- the disabledCipherSuites
-
setDisabledCipherSuites
- Parameters:
disabledCipherSuites- the disabledCipherSuites to set
-
getEnabledProtocols
- Returns:
- the enabledProtocols or null if the defaults should be used
-
setEnabledProtocols
The protocols to be set as enabled.- Parameters:
enabledProtocols- the enabled protocols to set, or null if the defaults should be used.
-
getDisabledProtocols
- Returns:
- the protocols to disable or null if none should be
-
setDisabledProtocols
The protocols to be disable.- Parameters:
disabledProtocols- the protocols to disable, or null if none should be.
-
getContextProtocol
- Returns:
- the context protocol to use
-
setContextProtocol
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
- Returns:
- the key alias
-
setKeyAlias
- Parameters:
keyAlias- the key alias to use
-
getDefaultSslPort
public int getDefaultSslPort() -
setDefaultSslPort
public void setDefaultSslPort(int defaultSslPort) -
setSslContextOverride
-
getSslContextOverride
-
getProxyHandlerSupplier
-
setProxyHandlerSupplier
-
getHttpHeaders
-
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
-