org.rhq.core.pluginapi.event
Interface EventContext


public interface EventContext


Field Summary
static int MINIMUM_POLLING_INTERVAL
          Minimum polling interval, in seconds.
 
Method Summary
 org.hyperic.sigar.SigarProxy getSigar()
          Gets an instance of Sigar.
 void publishEvent(Event event)
          Publishes the specified Event.
 void registerEventPoller(EventPoller poller, int pollingInterval)
          Tells the plugin container to start polling for Events using the specified EventPoller.
 void registerEventPoller(EventPoller poller, int pollingInterval, String sourceLocation)
          Tells the plugin container to start polling the specified source for Events using the specified EventPoller.
 void unregisterEventPoller(String eventType)
          Tells the plugin container to stop polling for Events of the specified type (i.e.
 void unregisterEventPoller(String eventType, String sourceLocation)
          Tells the plugin container to stop polling the specified source for Events of the specified type (i.e.
 

Field Detail

MINIMUM_POLLING_INTERVAL

static final int MINIMUM_POLLING_INTERVAL
Minimum polling interval, in seconds.

See Also:
Constant Field Values
Method Detail

publishEvent

void publishEvent(@NotNull
                  Event event)
Publishes the specified Event. This means the Plugin Container will queue the Event to be sent to the Server.

Parameters:
event - the Event to be published

registerEventPoller

void registerEventPoller(@NotNull
                         EventPoller poller,
                         int pollingInterval)
Tells the plugin container to start polling for Events using the specified EventPoller.

Parameters:
poller - the poller that will be used
pollingInterval - the number of seconds to wait between polls. If the value less than MINIMUM_POLLING_INTERVAL is specified, MINIMUM_POLLING_INTERVAL will be used instead.

registerEventPoller

void registerEventPoller(@NotNull
                         EventPoller poller,
                         int pollingInterval,
                         @NotNull
                         String sourceLocation)
Tells the plugin container to start polling the specified source for Events using the specified EventPoller.

Parameters:
poller - the poller that will be used
pollingInterval - the number of seconds to wait between polls. If the value less than MINIMUM_POLLING_INTERVAL is specified, MINIMUM_POLLING_INTERVAL will be
sourceLocation - the location of the source to start polling

unregisterEventPoller

void unregisterEventPoller(@NotNull
                           String eventType)
Tells the plugin container to stop polling for Events of the specified type (i.e. EventDefinition name).

Parameters:
eventType - the type of Event to stop polling for

unregisterEventPoller

void unregisterEventPoller(@NotNull
                           String eventType,
                           @NotNull
                           String sourceLocation)
Tells the plugin container to stop polling the specified source for Events of the specified type (i.e. EventDefinition name).

Parameters:
eventType - the type of Event to stop polling for
sourceLocation - the location of the source to stop polling

getSigar

@NotNull
org.hyperic.sigar.SigarProxy getSigar()
Gets an instance of Sigar. Plugins that need to use Sigar, should use this method to get an instance, rather than instantiating Sigar themselves.

Returns:
an instance of Sigar


Copyright © 2008-2009 RHQ Project Advisory Board (Red Hat, Inc.). All Rights Reserved.