org.kuali.rice.kew.plugin
Class Plugin

java.lang.Object
  extended by org.kuali.rice.core.lifecycle.BaseLifecycle
      extended by org.kuali.rice.core.resourceloader.ResourceLoaderContainer
          extended by org.kuali.rice.core.resourceloader.BaseResourceLoader
              extended by org.kuali.rice.core.resourceloader.BaseWrappingResourceLoader
                  extended by org.kuali.rice.kew.plugin.Plugin
All Implemented Interfaces:
Lifecycle, ObjectLoader, ResourceLoader, ServiceLocator

public class Plugin
extends BaseWrappingResourceLoader

A KEW Plugin. A Plugin represents a distinct classloading space living below (as a child) of the core KEW classloader. It allows for loading of plugin resources from core components of the system. Essentially a Plugin is a specialized ResourceLoader with a custom classloader and attached configuration.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Field Summary
private  Config config
           
private static org.apache.log4j.Logger LOG
           
private  List<PluginListener> pluginListeners
           
private  boolean started
           
private  boolean startupFailure
           
private  boolean supressStartupFailure
           
 
Fields inherited from interface org.kuali.rice.core.resourceloader.ResourceLoader
EMBEDDED_CLIENT_APP_RESOURCE_LOADER, EMBEDDED_PLUGIN, KSB_CONFIGURER_CONTAINER_NAME, PLUGIN_REGISTRY_LOADER_NAME, RMI_PLUGIN, ROOT_RESOURCE_LOADER_NAME, WEB_SERVICE_PLUGIN
 
Constructor Summary
Plugin(QName name, Config config, ClassLoader classLoader)
           
 
Method Summary
 void addPluginListener(PluginListener pluginListener)
           
 void bindThread()
           
 Config getConfig()
           
private  String getLogPrefix()
           
 boolean isStarted()
           
 boolean isSupressStartupFailure()
           
 void removePluginListener(PluginListener pluginListener)
           
private  void resetPlugin()
          Cleanup plugin resources.
 void setSupressStartupFailure(boolean supressStartupFailure)
           
 void start()
          Starts the plugin.
protected  void startPluginListeners()
           
 void stop()
          Stops the plugin.
protected  void stopPluginListeners()
          If we fail to stop a plugin listener, try the next one but don't propogate any exceptions out of this method.
 String toString()
           
 void unbindThread()
           
 
Methods inherited from class org.kuali.rice.core.resourceloader.BaseWrappingResourceLoader
cacheService, getPackageNamesToFilter, getService, postProcessObject, postProcessService, shouldCacheService, shouldWrapObject, shouldWrapService
 
Methods inherited from class org.kuali.rice.core.resourceloader.BaseResourceLoader
getClassLoader, getContents, getObject, getServiceLocator, isPostProcessContainer, setClassLoader, setPostProcessContainer, wrap
 
Methods inherited from class org.kuali.rice.core.resourceloader.ResourceLoaderContainer
addResourceLoader, addResourceLoaderFirst, containsResourceLoader, getName, getResourceLoader, getResourceLoaderNames, getResourceLoaders, removeAllResourceLoaders, removeResourceLoader, setName
 
Methods inherited from class org.kuali.rice.core.lifecycle.BaseLifecycle
setStarted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.core.resourceloader.ResourceLoader
addResourceLoader, addResourceLoaderFirst, getName, getResourceLoader, getResourceLoaderNames, getResourceLoaders, removeResourceLoader, setName
 

Field Detail

LOG

private static final org.apache.log4j.Logger LOG

config

private Config config

pluginListeners

private List<PluginListener> pluginListeners

supressStartupFailure

private boolean supressStartupFailure

started

private boolean started

startupFailure

private boolean startupFailure
Constructor Detail

Plugin

public Plugin(QName name,
              Config config,
              ClassLoader classLoader)
Method Detail

start

public void start()
Starts the plugin.

Specified by:
start in interface Lifecycle
Overrides:
start in class BaseWrappingResourceLoader

stop

public void stop()
Stops the plugin.

Specified by:
stop in interface Lifecycle
Overrides:
stop in class BaseResourceLoader

isStarted

public boolean isStarted()
Specified by:
isStarted in interface Lifecycle
Overrides:
isStarted in class BaseLifecycle

addPluginListener

public void addPluginListener(PluginListener pluginListener)

removePluginListener

public void removePluginListener(PluginListener pluginListener)

startPluginListeners

protected void startPluginListeners()

stopPluginListeners

protected void stopPluginListeners()
If we fail to stop a plugin listener, try the next one but don't propogate any exceptions out of this method. Otherwise the plugin ends up dying and can't be reloaded from a hot deploy.


isSupressStartupFailure

public boolean isSupressStartupFailure()

setSupressStartupFailure

public void setSupressStartupFailure(boolean supressStartupFailure)

bindThread

public void bindThread()

unbindThread

public void unbindThread()

resetPlugin

private void resetPlugin()
Cleanup plugin resources.


getLogPrefix

private String getLogPrefix()

getConfig

public Config getConfig()

toString

public String toString()
Overrides:
toString in class ResourceLoaderContainer


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.