Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

LifecyclePurpose
onStart()

Allows a component to attach logic to a start event. For example:


Code Block
themeEclipse
public void onStart() {
   LOG.log(Level.INFO, “onStart() invoked!");
}

 

Dependencies: onStart() is invoked after onInit() and before onInstall() and onUpdate(), therefore onStart() should not depend on logic contained within onInstall() and onUpdate():

onInit()

onStart()

onInstall()

-----------

onInit()

onStart()

onUpdate()

onInstall()

Allows a component to attach logic to an install event. For example:


Code Block
themeEclipse
public void onInstall() {
   LOG.log(Level.INFO, “onInstall() invoked!");
}

 

Dependencies: onInstall() is invoked after onInit() and onStart():

onInit()

onStart()

onInstall()

onStop()

Allows a component to attach logic to a stop event. For example:


Code Block
themeEclipse
public void onStop() {
   LOG.log(Level.INFO, “onStop() invoked!");
}

 

Dependencies: onStop() is invoked before onDestroy(), therefore it should not depend on logic contained within onDestroy():

onStop()

onDestroy()

onUpdate()

Allows a component to attach logic to an update event. For example:


Code Block
themeEclipse
public void onUpdate() {
   LOG.log(Level.INFO, “onUpdate() invoked!");
}

 

Dependencies: onUpdate() is invoked after onInit() and onStart():

onInit()

onStart()

onUpdate()

onUninstall()

Allows a component to attach logic to an uninstall event. The plugin containing the component must be in an active state in order for the onUninstall() method to be invoked. For example:


Code Block
themeEclipse
public void onUninstall() {
   LOG.log(Level.INFO, “onUninstall() invoked!");
}

 

Dependencies: onUninstall() is invoked before onStop() and onDestroy(), therefore it should not depend on logic contained within onStop() and onDestroy():

onUninstall()

onStop()

onDestroy()

onPurge()

Allows a component to attach logic to a purge event.


Note

The plugin containing the component must be in an active state in order for the onPurge() method to be invoked.



Code Block
themeEclipse
public void onPurge() {
   LOG.log(Level.INFO, “onPurge() invoked!");
}

 

Dependencies: onPurge() has no dependencies.

onInit()

Allows a component to attach logic to an init event. For example:


Code Block
themeEclipse
public void onInit() {
   LOG.log(Level.INFO, “onInit() invoked!");
}

 

Dependencies: onInit() is always invoked first, therefore it should not depend on logic from any other method.

 onDestroy()

Allows a component to attach logic to a destroy event. For example:


Code Block
themeEclipse
public void onDestroy() {
   LOG.log(Level.INFO, “onDestroy() invoked!");
}

 

Dependencies: onDestroy() has no dependencies:

onStop()

onDestroy()

...

Another XperienCentral specific tool for plugin management is the Plugin Management consoleconsole. This is a plugin available from the Configuration > Plugins menu item in XperienCentral. While the Felix Gogo shell provides access to the OSGi bundles only (and is unaware of plugin specific functionality), the Plugins Management Console provides access to plugin-specific lifecycle methods, like purge. For more information on the Plugin Management Console, refer to the XperienCentral online help. The Plugins Management Console appears as follows:

...