org.rhq.enterprise.server.plugin.pc.alert
Class AlertSenderPluginManager

java.lang.Object
  extended by org.rhq.enterprise.server.plugin.pc.ServerPluginManager
      extended by org.rhq.enterprise.server.plugin.pc.alert.AlertSenderPluginManager

public class AlertSenderPluginManager
extends ServerPluginManager

Plugin manager that takes care of loading the plug-ins and instantiating of AlertSender etc.

Author:
Heiko W. Rupp

Constructor Summary
AlertSenderPluginManager(AbstractTypeServerPluginContainer pc)
           
 
Method Summary
 AlertSender getAlertSenderForNotification(org.rhq.core.domain.alert.notification.AlertNotification notification)
          Instantiate an AlertSender for the passed shortName, which is the name you have provided in the plugin descriptor in the <shortName> element
 AlertSenderInfo getAlertSenderInfo(String shortName)
           
 CustomAlertSenderBackingBean getBackingBeanForSender(String shortName)
           
 String getBackingBeanNameForSender(String shortName)
           
 List<String> getPluginList()
          Return the list of deployed alert sender plug-ins by their <shortName>
 void loadPlugin(ServerPluginEnvironment env, boolean enabled)
          Postprocess the loading of the plugin - the actual load is done in the super class.
protected  void unloadPlugin(String pluginName)
          Informs the plugin manager that a plugin with the given name is to be unloaded.
 
Methods inherited from class org.rhq.enterprise.server.plugin.pc.ServerPluginManager
createServerPluginComponent, disablePlugin, enablePlugin, getLog, getParentPluginContainer, getPlugin, getPluginEnvironment, getPluginEnvironments, getServerPluginComponent, getServerPluginContext, initialize, instantiatePluginClass, isPluginEnabled, isPluginLoaded, loadPluginClass, rebuildServerPluginEnvironment, reloadPlugin, shutdown, startPlugin, startPlugins, stopPlugin, stopPlugins, unloadPlugin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlertSenderPluginManager

public AlertSenderPluginManager(AbstractTypeServerPluginContainer pc)
Method Detail

loadPlugin

public void loadPlugin(ServerPluginEnvironment env,
                       boolean enabled)
                throws Exception
Postprocess the loading of the plugin - the actual load is done in the super class. Here we verify that the passed <plugin-class> is valid and build the list of plugins that can be queried by the UI etc.

Overrides:
loadPlugin in class ServerPluginManager
Parameters:
env - the environment of the plugin to be loaded
enabled - if true, the plugin is to be enabled and will be started soon
Throws:
Exception - if the alert plugin could not be loaded due to errors such as the alert class being invalid

unloadPlugin

protected void unloadPlugin(String pluginName)
                     throws Exception
Description copied from class: ServerPluginManager
Informs the plugin manager that a plugin with the given name is to be unloaded. The component's shutdown method will be called.

Overrides:
unloadPlugin in class ServerPluginManager
Parameters:
pluginName - the name of the plugin to be unloaded
Throws:
Exception - if the plugin manager cannot unload the plugin

getAlertSenderForNotification

public AlertSender getAlertSenderForNotification(org.rhq.core.domain.alert.notification.AlertNotification notification)
Instantiate an AlertSender for the passed shortName, which is the name you have provided in the plugin descriptor in the <shortName> element

Parameters:
notification - The alert notification we need the sender for. Wanted sender is in notification.getSenderName()
Returns:
a new AlertSender with preferences set
See Also:
AlertSender

getPluginList

public List<String> getPluginList()
Return the list of deployed alert sender plug-ins by their <shortName>

Returns:
List of plugin names

getAlertSenderInfo

public AlertSenderInfo getAlertSenderInfo(String shortName)

getBackingBeanForSender

public CustomAlertSenderBackingBean getBackingBeanForSender(String shortName)

getBackingBeanNameForSender

public String getBackingBeanNameForSender(String shortName)


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.