|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectit.jnrpe.plugins.PluginBase
public abstract class PluginBase
If your plugin needs to send events and you don't mind extending this class, you can save some coding using this as a base.
| Constructor Summary | |
|---|---|
PluginBase()
|
|
| Method Summary | |
|---|---|
void |
addListener(IJNRPEEventListener listener)
Adds a new listener to the list of objects that will receive the messages. |
void |
addListeners(Collection<IJNRPEEventListener> listeners)
Adds a new collection of listeners. |
protected Set<IJNRPEEventListener> |
getListeners()
Returns all the registered listeners. |
void |
sendEvent(LogEvent evt,
String sMessage)
Sends an event. |
void |
sendEvent(LogEvent evt,
String sMessage,
Exception exc)
Sends an event. |
void |
sendEvent(String sCustomEvent,
EventParam... vParams)
Sends a custom event. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface it.jnrpe.plugins.IPluginInterface |
|---|
execute |
| Constructor Detail |
|---|
public PluginBase()
| Method Detail |
|---|
public final void addListener(IJNRPEEventListener listener)
addListener in interface IPluginInterfaceExlistener - The new listenerpublic final void addListeners(Collection<IJNRPEEventListener> listeners)
addListeners in interface IPluginInterfaceExlisteners - The collection of listeners to be added
public final void sendEvent(LogEvent evt,
String sMessage)
evt - The event typesMessage - The message
public final void sendEvent(LogEvent evt,
String sMessage,
Exception exc)
evt - The event typesMessage - The messageexc - The exception to be attached to the event
public final void sendEvent(String sCustomEvent,
EventParam... vParams)
sCustomEvent - The custom event identifiervParams - The parameter of the event. Can be null.protected final Set<IJNRPEEventListener> getListeners()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||