Class TransportOptions

java.lang.Object
org.apache.qpid.jms.transports.TransportOptions
All Implemented Interfaces:
Cloneable

public class TransportOptions extends Object implements Cloneable
Encapsulates all the Transport options in one configuration object.
  • Field Details

  • Constructor Details

    • TransportOptions

      public TransportOptions()
  • Method Details

    • clone

      public TransportOptions clone()
      Overrides:
      clone in class Object
    • 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 an IllegalArgumentException will 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 an IllegalArgumentException will 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)
    • getHttpHeaders

      public Map<String,String> 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

      protected TransportOptions copyOptions(TransportOptions copy)