org.ow2.petals.container.lifecycle
Class SharedLibraryLifeCycleImpl

java.lang.Object
  extended by org.ow2.petals.container.lifecycle.SharedLibraryLifeCycleImpl
All Implemented Interfaces:
SharedLibraryLifeCycle

public class SharedLibraryLifeCycleImpl
extends java.lang.Object
implements SharedLibraryLifeCycle

The LifeCycle implementation of the shared library.

Author:
Nicolas SALATGE - EBM WebSourcing

Field Summary
static java.lang.String INSTALLED
          state flag: the shared library is installed.
static java.lang.String UNINSTALLED
          state flag: the shared library is uninstalled.
 
Constructor Summary
SharedLibraryLifeCycleImpl()
          The default constructor.
 
Method Summary
 java.util.List<java.lang.String> getRegisteredComponents()
          get the list of the registered components.
 java.lang.String getState()
          Get the state
 void init(org.ow2.petals.jbi.descriptor.original.generated.Jbi.SharedLibrary sharedLibrary, java.net.URL[] baseUrls1, boolean useParentFirst)
          Initialization of sharedLibraryLifeCycle.
 boolean isLoaded()
          Test the installation flag.
 void loadSharedLibrary()
          Install the jbi shared library.
 void registerComponent(java.lang.String componentName)
          Register a component which uses this Shared Library.
 void start()
          Start of the shared library lifecycle.
 void stop()
          Stop of the shared library lifecycle.
 void unLoadSharedLibrary()
          Uninstall the jbi shared library.
 void unregisterComponent(java.lang.String componentName)
          Unregister a component if it is referenced by this Shared Library.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTALLED

public static final java.lang.String INSTALLED
state flag: the shared library is installed.

See Also:
Constant Field Values

UNINSTALLED

public static final java.lang.String UNINSTALLED
state flag: the shared library is uninstalled.

See Also:
Constant Field Values
Constructor Detail

SharedLibraryLifeCycleImpl

public SharedLibraryLifeCycleImpl()
The default constructor.

Method Detail

init

public void init(org.ow2.petals.jbi.descriptor.original.generated.Jbi.SharedLibrary sharedLibrary,
                 java.net.URL[] baseUrls1,
                 boolean useParentFirst)
Description copied from interface: SharedLibraryLifeCycle
Initialization of sharedLibraryLifeCycle.

Specified by:
init in interface SharedLibraryLifeCycle
Parameters:
sharedLibrary - the shared library
baseUrls1 - the base urls
useParentFirst - use parent first

isLoaded

public boolean isLoaded()
Description copied from interface: SharedLibraryLifeCycle
Test the installation flag.

Specified by:
isLoaded in interface SharedLibraryLifeCycle
Returns:
true if the shared library is already installed

loadSharedLibrary

public void loadSharedLibrary()
                       throws org.ow2.petals.kernel.api.server.PetalsException
Description copied from interface: SharedLibraryLifeCycle
Install the jbi shared library. Call the Bootstrap onInstall() and cleanup() methods, register the shared library object, and return its jmxName.

Specified by:
loadSharedLibrary in interface SharedLibraryLifeCycle
Throws:
org.ow2.petals.kernel.api.server.PetalsException - the component is already installed

unLoadSharedLibrary

public void unLoadSharedLibrary()
Description copied from interface: SharedLibraryLifeCycle
Uninstall the jbi shared library. Call the Bootstrap onUninstall() and cleanup() methods, deregister the jbiComponent object.

Specified by:
unLoadSharedLibrary in interface SharedLibraryLifeCycle

registerComponent

public void registerComponent(java.lang.String componentName)
Description copied from interface: SharedLibraryLifeCycle
Register a component which uses this Shared Library.

Specified by:
registerComponent in interface SharedLibraryLifeCycle

unregisterComponent

public void unregisterComponent(java.lang.String componentName)
Description copied from interface: SharedLibraryLifeCycle
Unregister a component if it is referenced by this Shared Library.

Specified by:
unregisterComponent in interface SharedLibraryLifeCycle

getRegisteredComponents

public java.util.List<java.lang.String> getRegisteredComponents()
Description copied from interface: SharedLibraryLifeCycle
get the list of the registered components.

Specified by:
getRegisteredComponents in interface SharedLibraryLifeCycle
Returns:
the list

getState

public java.lang.String getState()
Get the state

Specified by:
getState in interface SharedLibraryLifeCycle
Returns:

start

public void start()
Start of the shared library lifecycle.

Specified by:
start in interface SharedLibraryLifeCycle

stop

public void stop()
Stop of the shared library lifecycle.

Specified by:
stop in interface SharedLibraryLifeCycle


Copyright © 2005-2011 Petals Link (EBM Websourcing). All Rights Reserved.