public final class Container
extends java.lang.Object
if (Container.get() == Container.TOMCAT) { .... }
Modifier and Type | Field and Description |
---|---|
private static java.util.Map |
classMappings
A map containing classes that can be searched for,
and which container they are typically found in.
|
static int |
HPAS |
static int |
JRUN |
static int |
ORION |
static int |
RESIN |
private static int |
result |
static int |
TOMCAT |
static int |
UNKNOWN |
static int |
WEBLOGIC |
static int |
WEBSPHERE |
Constructor and Description |
---|
Container() |
Modifier and Type | Method and Description |
---|---|
static int |
get()
Get the current container.
|
private static java.lang.String |
searchForClosestClass(java.util.Map classMappings)
Walk up the classloader hierachy and attempt to find a class in the classMappings Map
that can be loaded.
|
public static final int UNKNOWN
public static final int TOMCAT
public static final int RESIN
public static final int ORION
public static final int WEBLOGIC
public static final int HPAS
public static final int JRUN
public static final int WEBSPHERE
private static int result
private static java.util.Map classMappings
public static int get()
private static java.lang.String searchForClosestClass(java.util.Map classMappings)