Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.quartz
Class SchedulerContext

    java.lang.Object
      org.quartz.utils.DirtyFlagMap
          org.quartz.SchedulerContext

All Implemented Interfaces:
  Cloneable, Map, Serializable

public class SchedulerContext
extends DirtyFlagMap
implements Serializable

Holds context/environment data that can be made available to Jobs as they are executed. This feature is much like the ServletContext feature when working with J2EE servlets.

Author:
  James House
See Also:
  `Scheduler.getContext()`, Serialized Form

Nested Class Summary

Nested classes inherited from class java.util.Map
`Map.Entry`

Constructor Summary
`SchedulerContext()` Create an empty `JobDataMap`.
`SchedulerContext(Map map)` Create a `JobDataMap` with the given data.

Method Summary
`boolean` | `containsTransientData()`
`boolean` | `getAllowsTransientData()`
`boolean` | `getBoolean(String key)` Retrieve the identified `boolean` value from the `SchedulerContext`.
`char` | `getChar(String key)` Retrieve the identified `char` value from the `SchedulerContext`.
`double` | `getDouble(String key)` Retrieve the identified `double` value from the `SchedulerContext`.
`float` | `getFloat(String key)` Retrieve the identified `float` value from the `SchedulerContext`.
`int` | `getInt(String key)` Retrieve the identified `int` value from the `SchedulerContext`.
`String[]` | `getKeys()`
`long` | `getLong(String key)` Retrieve the identified `long` value from the `SchedulerContext`.
`String` | `getString(String key)` Retrieve the identified `String` value from the `SchedulerContext`.
`Object` | `put(Object key, Object value)` Adds the given `Object` value to the `SchedulerContext`.
`void` | `put(String key, boolean value)` Adds the given `boolean` value to the `SchedulerContext`.
`void` | `put(String key, char value)` Adds the given `char` value to the `SchedulerContext`.
`void` | `put(String key, double value)` Adds the given `double` value to the `SchedulerContext`.
`void` | `put(String key, float value)` Adds the given `float` value to the `SchedulerContext`.
`void` | `put(String key, int value)` Adds the given `int` value to the `SchedulerContext`.
`void` | `put(String key, long value)` Adds the given `long` value to the `SchedulerContext`.
`void` | `put(String key, String value)` Adds the given `String` value to the `SchedulerContext`.
`void` | `putAll(Map map)` Adds the name-value pairs in the given `Map` to the `SchedulerContext`.
`void` | `removeTransientData()` Nulls-out any data values that are non-Serializable.
`void` | `setAllowsTransientData(boolean allowsTransientData)` Tell the `SchedulerContext` that it should allow non- `Serializable` data.

Methods inherited from class org.quartz.utils.DirtyFlagMap
`clear, clearDirtyFlag, clone, containsKey, containsValue, entrySet, equals, get, getWrappedMap, isDirty, isEmpty, isMutable, keySet, remove, setMutable, size, values`

Methods inherited from class java.lang.Object
`finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface java.util.Map
`hashCode`

Constructor Detail

### SchedulerContext

    public SchedulerContext()

  Create an empty `JobDataMap`.

### SchedulerContext

    public SchedulerContext(Map map)

  Create a `JobDataMap` with the given data.

Method Detail

### setAllowsTransientData

    public void setAllowsTransientData(boolean allowsTransientData)

  Tell the `SchedulerContext` that it should allow non- `Serializable` data.

  Future versions of Quartz may make distinctions on how it propogates data in the SchedulerContext between instances of proxies to a single scheduler instance - i.e. if Quartz is being used via RMI.

### getAllowsTransientData

    public boolean getAllowsTransientData()

### containsTransientData

    public boolean containsTransientData()

### removeTransientData

    public void removeTransientData()

  Nulls-out any data values that are non-Serializable.

### putAll

    public void putAll(Map map)

  Adds the name-value pairs in the given `Map` to the `SchedulerContext`.

  All keys must be `String`s.

  Specified by:
    `putAll` in interface `Map`
  Overrides:
    `putAll` in class `DirtyFlagMap`

### put

    public void put(String key,
                    int value)

  Adds the given `int` value to the `SchedulerContext`.

### put

    public void put(String key,
                    long value)

  Adds the given `long` value to the `SchedulerContext`.

### put

    public void put(String key,
                    float value)

  Adds the given `float` value to the `SchedulerContext`.

### put

    public void put(String key,
                    double value)

  Adds the given `double` value to the `SchedulerContext`.

### put

    public void put(String key,
                    boolean value)

  Adds the given `boolean` value to the `SchedulerContext`.

### put

    public void put(String key,
                    char value)

  Adds the given `char` value to the `SchedulerContext`.

### put

    public void put(String key,
                    String value)

  Adds the given `String` value to the `SchedulerContext`.

### put

    public Object put(Object key,
                      Object value)

  Adds the given `Object` value to the `SchedulerContext`.

  Specified by:
    `put` in interface `Map`
  Overrides:
    `put` in class `DirtyFlagMap`

### getInt

    public int getInt(String key)

  Retrieve the identified `int` value from the `SchedulerContext`.

  Throws:
    `ClassCastException` - if the identified object is not an Integer.

### getLong

    public long getLong(String key)

  Retrieve the identified `long` value from the `SchedulerContext`.

  Throws:
    `ClassCastException` - if the identified object is not a Long.

### getFloat

    public float getFloat(String key)

  Retrieve the identified `float` value from the `SchedulerContext`.

  Throws:
    `ClassCastException` - if the identified object is not a Float.

### getDouble

    public double getDouble(String key)

  Retrieve the identified `double` value from the `SchedulerContext`.

  Throws:
    `ClassCastException` - if the identified object is not a Double.

### getBoolean

    public boolean getBoolean(String key)

  Retrieve the identified `boolean` value from the `SchedulerContext`.

  Throws:
    `ClassCastException` - if the identified object is not a Boolean.

### getChar

    public char getChar(String key)

  Retrieve the identified `char` value from the `SchedulerContext`.

  Throws:
    `ClassCastException` - if the identified object is not a Character.

### getString

    public String getString(String key)

  Retrieve the identified `String` value from the `SchedulerContext`.

  Throws:
    `ClassCastException` - if the identified object is not a String.

### getKeys

    public String[] getKeys()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Quartz Enterprise Job Scheduler Project Page
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD