Package edu.uiuc.ncsa.security.core.util
Class AbstractEnvironment
- java.lang.Object
-
- edu.uiuc.ncsa.security.core.util.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 Summary
Constructors Modifier Constructor Description protected
AbstractEnvironment()
protected
AbstractEnvironment(MyLoggingFacade myLogger)
protected
AbstractEnvironment(MyLoggingFacade myLogger, Map<String,String> constants)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
debug(String x)
Write a debug message to the log.void
error(String x)
Write an error message to the log.Map<String,String>
getConstants()
Returns a hash map of constants that are used for this service.MyLoggingFacade
getMyLogger()
void
info(String x)
Write an informational message to the logboolean
isDebugOn()
Query if debugging is enabled for this logger.boolean
isPingable()
Turn off or on pinging for this OA4MP install.void
setDebugOn(boolean setOn)
Enable/disable debugging for this loggervoid
setPingable(boolean pingable)
void
warn(String x)
Write a warning to the log.
-
-
-
Constructor Detail
-
AbstractEnvironment
protected AbstractEnvironment(MyLoggingFacade myLogger)
-
AbstractEnvironment
protected AbstractEnvironment(MyLoggingFacade myLogger, Map<String,String> constants)
-
AbstractEnvironment
protected AbstractEnvironment()
-
-
Method Detail
-
isDebugOn
public boolean isDebugOn()
Description copied from interface:Logable
Query if debugging is enabled for this logger.
-
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 interfaceLogable
-
getMyLogger
public MyLoggingFacade getMyLogger()
-
debug
public void debug(String x)
Description copied from interface:Logable
Write a debug message to the log.
-
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.
-
info
public void info(String x)
Description copied from interface:Logable
Write an informational message to the log
-
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.
-
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)
-
-