Class AbstractEnvironment

  • All Implemented Interfaces:
    Logable
    Direct Known Subclasses:
    MailEnvironment, SASEnvironment, TestEnvironment

    public abstract class AbstractEnvironment
    extends Object
    implements Logable
    Basic runtime environment. Generally, you read a configuration with one of the configuration utilities then create an instance of this. This contains all the configuration and configured factories that the application needs. This permits different environments to operate simultaneously if there are, for instance, multiple services running.

    Created by Jeff Gaynor
    on Nov 5, 2010 at 10:17:04 AM

    • Constructor Detail

      • AbstractEnvironment

        protected AbstractEnvironment​(MyLoggingFacade myLogger)
      • AbstractEnvironment

        protected AbstractEnvironment()
    • Method Detail

      • isDebugOn

        public boolean isDebugOn()
        Description copied from interface: Logable
        Query if debugging is enabled for this logger.
        Specified by:
        isDebugOn in interface Logable
        Returns:
      • getConstants

        public Map<String,​String> getConstants()
        Returns a hash map of constants that are used for this service. There are required constants (such as for the callback url) and others may be added too.
      • setDebugOn

        public void setDebugOn​(boolean setOn)
        Description copied from interface: Logable
        Enable/disable debugging for this logger
        Specified by:
        setDebugOn in interface Logable
      • debug

        public void debug​(String x)
        Description copied from interface: Logable
        Write a debug message to the log.
        Specified by:
        debug in interface Logable
      • error

        public void error​(String x)
        Description copied from interface: Logable
        Write an error message to the log. Typically this is invoked as the last command before throwing an exception.
        Specified by:
        error in interface Logable
      • info

        public void info​(String x)
        Description copied from interface: Logable
        Write an informational message to the log
        Specified by:
        info in interface Logable
      • warn

        public void warn​(String x)
        Description copied from interface: Logable
        Write a warning to the log. This indicates a severe, but non-fatal condition exists.
        Specified by:
        warn in interface Logable
      • isPingable

        public boolean isPingable()
        Turn off or on pinging for this OA4MP install. If disabled, all pings will generate a server side exception.
        Returns:
      • setPingable

        public void setPingable​(boolean pingable)