org.rhq.enterprise.server.plugin.pc
Class ScheduledJobInvocationContext

java.lang.Object
  extended by org.rhq.enterprise.server.plugin.pc.ScheduledJobInvocationContext

public class ScheduledJobInvocationContext
extends java.lang.Object

A scheduled job's invocation method can take a single argument of this type. If this is the case, the scheduled job's method will be passed an object of this type enabling the job being invoked to be given information about the invocation.

Author:
John Mazzitelli

Constructor Summary
ScheduledJobInvocationContext(ScheduledJobDefinition jobDefinition, ServerPluginContext pluginContext, ServerPluginComponent serverPluginComponent)
           
 
Method Summary
 ScheduledJobDefinition getJobDefinition()
          The definition of the triggered job that owns this context object.
 ServerPluginComponent getServerPluginComponent()
          If the job's plugin has a plugin component defined, this will return the instance of that component.
 ServerPluginContext getServerPluginContext()
          General information for the job's plugin.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScheduledJobInvocationContext

public ScheduledJobInvocationContext(ScheduledJobDefinition jobDefinition,
                                     ServerPluginContext pluginContext,
                                     ServerPluginComponent serverPluginComponent)
Method Detail

getJobDefinition

public ScheduledJobDefinition getJobDefinition()
The definition of the triggered job that owns this context object.

Returns:
the triggered job's definition

getServerPluginContext

public ServerPluginContext getServerPluginContext()
General information for the job's plugin.

Returns:
the triggered job's plugin context

getServerPluginComponent

public ServerPluginComponent getServerPluginComponent()
If the job's plugin has a plugin component defined, this will return the instance of that component. This is helpful for stateless jobs to obtain information from the plugin component, which is stateful.

Returns:
the plugin component instance from the triggered job's plugin, or null if there is no plugin component for the plugin


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