Class CoreEnvironment


  • public class CoreEnvironment
    extends Object
    The CoreEnvironment is an extendable, configurable and stateful config designed to be passed into a core instance.
    Since:
    1.0.0
    • Field Detail

      • DEFAULT_SEED_NODES

        public static final Set<SeedNode> DEFAULT_SEED_NODES
        Holds the default seed nodes (going to localhost) with default ports.
      • DEFAULT_RETRY_STRATEGY

        public static final RetryStrategy DEFAULT_RETRY_STRATEGY
        The default retry strategy used for all ops if not overridden.
    • Method Detail

      • agentPackage

        protected Package agentPackage()
        Make sure to override this in client implementations so it picks up the right manifest.

        This method should be overridden by client implementations to make sure their version is included instead.

        Returns:
        the package of the target application to extract properties.
      • defaultAgentTitle

        protected String defaultAgentTitle()
        Returns the default user agent name that is used as part of the resulting string.
      • userAgent

        public UserAgent userAgent()
        User agent used to identify this client against the server.
      • eventBus

        public EventBus eventBus()
        The central event bus which manages all kinds of messages flowing throughout the client.
        Returns:
        the event bus currently in use.
      • ioEnvironment

        public IoEnvironment ioEnvironment()
        Holds the environmental configuration/state that is tied to the IO layer.
      • tracer

        public io.opentracing.Tracer tracer()
      • operationTracingEnabled

        public boolean operationTracingEnabled()
      • timer

        public Timer timer()
        Holds the timer which is used to schedule tasks and trigger their callback, for example to time out requests.
        Returns:
        the timer used.
      • shutdown

        public void shutdown​(Duration timeout)
        Shuts down this Environment.

        Note that once shutdown, the environment cannot be restarted so it is advised to perform this operation at the very last operation in the SDK shutdown process.

        Parameters:
        timeout - the timeout to wait maximum.
      • shutdown

        public void shutdown()