Package edu.uiuc.ncsa.security.core
Interface Initializable
- 
- All Known Implementing Classes:
- DBInitializer,- FSInitializer,- MemoryStore.MSInitializer,- SQLDBInitializer,- StoreInitializer,- TableInitializer
 
 public interface InitializableAn interface for getting clean semantics on creation, initialization and destruction of things. The issue is that things -- like databases and other persistent stores -- must have a separate creation/initialization mechanisms unlike simple Java object instantiation where both occur at once.
 This interface organizes this.
 NOTE: A failure means that the returned value is false rather than true! In case of bona fide errors applications should throw the specific runtime exception or wrap it in a GeneralException. An example would be if this is implemented against a database and no connection exists.LifecycleGenerally create and destroy are called at most once in the lifecycle, whereinit()can be called whenever the state needs to be reset.Created by Jeff Gaynor 
 on May 10, 2010 at 8:29:51 AM
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancreateNew()Creates a completely new instance.booleandestroy()Destroy the object completely.booleaninit()Initialize an existing object.booleanisCreated()(Optional) Returns true if the object in question has been created.booleanisDestroyed()(Optional) Returns true if the object in question has been destroyed.booleanisInitialized()(Optional) Returns true if the object in question has been initialized.
 
- 
- 
- 
Method Detail- 
destroyboolean destroy() Destroy the object completely. Returnstrueif the object existed before destroy was called. Further calls to this object must fail after this invocation.
 - 
initboolean init() Initialize an existing object. This throws an exception if the object does not exist. The state after this call is exactly as if the system were created for the first time. Calls to the object before invocation have no guarantee of success.- Returns:
- Returns True if the operation succeeds.
 
 - 
createNewboolean createNew() Creates a completely new instance. Fails if an instance already exists. In that case, call destroy first. For instance, this might create all file system entries or drop then recreate all tables in an SQL database. Compare this with init which might delete any entries in a file store or SQL table.- Returns:
 
 - 
isCreatedboolean isCreated() (Optional) Returns true if the object in question has been created. If this cannot be determined then the call should throw an exception.- Returns:
 
 - 
isInitializedboolean isInitialized() (Optional) Returns true if the object in question has been initialized. If this cannot be determined this call should throw an exception.- Returns:
 
 - 
isDestroyedboolean isDestroyed() (Optional) Returns true if the object in question has been destroyed. If this cannot be determined this call should throw an exception.- Returns:
 
 
- 
 
-