Class DaemonConfiguration


  • public class DaemonConfiguration
    extends java.lang.Object
    • Field Detail

      • DAEMON_ADDRESS_ENVIRONMENT_VARIABLE_KEY

        public static final java.lang.String DAEMON_ADDRESS_ENVIRONMENT_VARIABLE_KEY
        Environment variable key used to override the address to which UDP packets will be emitted. Valid values are of the form `ip_address:port`. Takes precedence over any system property, constructor value, or setter value used.
        See Also:
        Constant Field Values
      • DAEMON_ADDRESS_SYSTEM_PROPERTY_KEY

        public static final java.lang.String DAEMON_ADDRESS_SYSTEM_PROPERTY_KEY
        System property key used to override the address to which UDP packets will be emitted. Valid values are of the form `ip_address:port`. Takes precedence over any constructor or setter value used.
        See Also:
        Constant Field Values
      • address

        @Deprecated
        public java.net.InetSocketAddress address
        Deprecated.
    • Constructor Detail

      • DaemonConfiguration

        public DaemonConfiguration()
    • Method Detail

      • setDaemonAddress

        public void setDaemonAddress​(java.lang.String socketAddress)
        Sets the daemon address. If either the AWS_XRAY_DAEMON_ADDRESS environment variable or com.amazonaws.xray.emitters.daemonAddress system property are set to a non-empty value, calling this method does nothing.
        Parameters:
        socketAddress - A notation of '127.0.0.1:2000' or 'tcp:127.0.0.1:2000 udp:127.0.0.2:2001' are both acceptable. The former one means UDP and TCP are running at the same address.
        Throws:
        java.lang.IllegalArgumentException - if socketAddress does not match the specified format.
      • setUDPAndTCPAddress

        public boolean setUDPAndTCPAddress​(@Nullable java.lang.String addr)
        Force set daemon address regardless of environment variable or system property. It falls back to the default values if the input is invalid.
        Parameters:
        addr - A notation of '127.0.0.1:2000' or 'tcp:127.0.0.1:2000 udp:127.0.0.2:2001' are both acceptable. The former one means UDP and TCP are running at the same address.
      • setTCPAddress

        public void setTCPAddress​(java.lang.String addr)
      • getTCPAddress

        public java.lang.String getTCPAddress()
      • setUDPAddress

        public void setUDPAddress​(java.lang.String addr)
      • getUDPAddress

        public java.lang.String getUDPAddress()
      • getAddressForEmitter

        public java.net.InetSocketAddress getAddressForEmitter()
      • getEndpointForTCPConnection

        public java.lang.String getEndpointForTCPConnection()