public class GravityManager extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
GravityManager.GravityServiceConfigurator |
| Constructor and Description |
|---|
GravityManager() |
| Modifier and Type | Method and Description |
|---|---|
static Gravity |
getGravity(ServletContext context)
Returns a previously started Gravity instance.
|
static void |
reconfigure(ServletContext context,
GravityConfig gravityConfig)
Reconfigure gravity with the new supplied configuration (after reloading granite-config.xml).
|
static Gravity |
start(ServletConfig servletConfig)
Parse gravity configuration (granite-config.xml), start gravity by using the specified factory and put it
in ServletContext.
|
static Gravity |
start(ServletContext context) |
public GravityManager()
public static Gravity start(ServletConfig servletConfig) throws ServletException
GenericServlet.init(ServletConfig) methods only and
synchronizes on the current ServletContext instance.servletConfig - the servlet config passed in HttpServlet.init(ServletConfig config) method.ServletException - if something goes wrong (GravityFactory not found, Gravity.start() error, etc.)public static Gravity start(ServletContext context) throws ServletException
ServletExceptionpublic static void reconfigure(ServletContext context, GravityConfig gravityConfig)
context - the ServletContext where the gravity instance is registered.gravityConfig - the new (reloaded) GravityConfig.public static Gravity getGravity(ServletContext context)
context - the ServletContext from which to retrieve the Gravity instance.start(ServletConfig)
has never been called).