Class LocalEnvironment

  • All Implemented Interfaces:
    Environment

    public class LocalEnvironment
    extends java.lang.Object
    implements Environment
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void configureContext​(MetricsContext context)  
      java.lang.String getLogGroupName()
      Get log group name.
      java.lang.String getName()
      Get the environment name.
      ISink getSink()  
      java.lang.String getType()
      Get the environment type.
      boolean probe()
      Determines whether or not we are executing in this environment.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • probe

        public boolean probe()
        Description copied from interface: Environment
        Determines whether or not we are executing in this environment.
        Specified by:
        probe in interface Environment
        Returns:
        true if it is running in this environment, otherwise, false
      • getName

        public java.lang.String getName()
        Description copied from interface: Environment
        Get the environment name. This will be used to set the ServiceName dimension.
        Specified by:
        getName in interface Environment
        Returns:
        the name of the environment
      • getType

        public java.lang.String getType()
        Description copied from interface: Environment
        Get the environment type. This will be used to set the ServiceType dimension.
        Specified by:
        getType in interface Environment
        Returns:
        the type of the environment
      • getLogGroupName

        public java.lang.String getLogGroupName()
        Description copied from interface: Environment
        Get log group name. This will be used to set the LogGroup dimension.
        Specified by:
        getLogGroupName in interface Environment
        Returns:
        the log group name
      • configureContext

        public void configureContext​(MetricsContext context)
        Specified by:
        configureContext in interface Environment
        Parameters:
        context - the context to configure with environment properties
      • getSink

        public ISink getSink()
        Specified by:
        getSink in interface Environment
        Returns:
        an appropriate sink for this environment