org.figure8.join.core.setup
Class BootstrapUtil

java.lang.Object
  extended by org.figure8.join.core.setup.BootstrapUtil

public class BootstrapUtil
extends java.lang.Object

Helper class that provides static methods for retrieving boostrap manager and context as well as manipulating it (close(), refresh()).

Version:
$Revision: 1.3 $
Author:
Laurent Broudoux

Constructor Summary
BootstrapUtil()
          Creates a new instance of BootstrapUtil
 
Method Summary
static void closeContext()
          Close the bootstrap context.
static org.springframework.context.ApplicationContext getBootstrapContext()
          Get the Spring bootstrap context for Join application.
static BootstrapManager getBootstrapManager()
          Get the bootstrap manager initialized by Spring container
static void refreshContext()
          Refresh the bootstrap context.
static void setBootstrapContext(org.springframework.context.ApplicationContext context)
          Set the Spring bootstrap context for Join application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BootstrapUtil

public BootstrapUtil()
Creates a new instance of BootstrapUtil

Method Detail

getBootstrapManager

public static BootstrapManager getBootstrapManager()
Get the bootstrap manager initialized by Spring container

Returns:
The BootstrapManager singleton instance

setBootstrapContext

public static void setBootstrapContext(org.springframework.context.ApplicationContext context)
Set the Spring bootstrap context for Join application.

Parameters:
context - Bootstrap context (provided by the bootstrap manager)

getBootstrapContext

public static org.springframework.context.ApplicationContext getBootstrapContext()
Get the Spring bootstrap context for Join application.

Returns:
The root application context

closeContext

public static void closeContext()
Close the bootstrap context. Different methods are used depending on context runtime implementation. This method can throw Spring runtime exception.


refreshContext

public static void refreshContext()
                           throws BootstrapException
Refresh the bootstrap context. That means that it is first closed and then reinitialised using a Spring ContextLoader

Throws:
BootstrapException - if context implementation is null or not restartable


Copyright © 2005-2008 Join. All Rights Reserved.