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

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

public class StatefulScheduledJobInvocationContext
extends ScheduledJobInvocationContext


Constructor Summary
StatefulScheduledJobInvocationContext(ScheduledJobDefinition jobDefinition, ServerPluginContext pluginContext, ServerPluginComponent serverPluginComponent, Map<String,String> jobData)
           
 
Method Summary
 boolean containsKey(String key)
          Checks to see whether or not the property key is stored in the context.
 String get(String key)
          Retrieves a property value from the context.
 Map<String,String> getJobData()
          Returns a read-only view of the properties stored in the context.
 void put(String key, String value)
          Adds a property to the context that is persisted across invocations of the job.
 String remove(String key)
          Removes the property value associated with the specified key
 
Methods inherited from class org.rhq.enterprise.server.plugin.pc.ScheduledJobInvocationContext
getJobDefinition, getServerPluginComponent, getServerPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatefulScheduledJobInvocationContext

public StatefulScheduledJobInvocationContext(ScheduledJobDefinition jobDefinition,
                                             ServerPluginContext pluginContext,
                                             ServerPluginComponent serverPluginComponent,
                                             Map<String,String> jobData)
Method Detail

put

public void put(String key,
                String value)
Adds a property to the context that is persisted across invocations of the job.

Overrides:
put in class ScheduledJobInvocationContext
Parameters:
key - The property name
value - The property value

get

public String get(String key)
Retrieves a property value from the context.

Overrides:
get in class ScheduledJobInvocationContext
Parameters:
key - The property key
Returns:
The property value or null if the key is not found

remove

public String remove(String key)
Removes the property value associated with the specified key

Overrides:
remove in class ScheduledJobInvocationContext
Parameters:
key - The property key
Returns:
The value previously associated with the key or null if the key is present in the context

containsKey

public boolean containsKey(String key)
Checks to see whether or not the property key is stored in the context.

Overrides:
containsKey in class ScheduledJobInvocationContext
Parameters:
key - The property key
Returns:
true if the key is found, false otherwise.

getJobData

public Map<String,String> getJobData()
Returns a read-only view of the properties stored in the context.

Overrides:
getJobData in class ScheduledJobInvocationContext
Returns:
A read-only view of the properties stored in the context.


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