|
Oracle Containers for J2EE Job Scheduler Java API Reference 10g Release 3 (10.1.3) B16026-01 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Core interface of the OracleAS Job Scheduler. Provides methods for creating, managing, and querying jobs.
Field Summary | |
static long |
DEFAULT_EXECUTION_THRESHOLD_MILLIS
Internal use only. |
static long |
DEFAULT_INTERVAL_THRESHOLD_MINUTES
The default interval threshold below which no timeout recovery is performed |
static java.util.logging.Level |
DEFAULT_JOB_EXECUTION_LOG_LEVEL
The default log level for any job execution logger |
static java.util.logging.Level |
DEFAULT_JOB_LOG_LEVEL
The default log level for any job logger |
static long |
DEFAULT_RETRY_PERIOD_MILLIS
Internal use only. |
static java.util.logging.Level |
DEFAULT_ROOT_LOG_LEVEL
The default log level for the scheduler root logger |
static long |
DEFAULT_ROUNDUP_THRESHOLD_MILLIS
Internal use only. |
static int |
EXECUTION_ABORTED
status value indicating job execution did not occur due to preemptory container crash or shutdown |
static int |
EXECUTION_BLACKOUT
status value indicating job execution did not occur due to a blackout window that was in effect at the time of execution |
static int |
EXECUTION_CANCELLED
status value indicating job execution has not completed as a result of the job being cancelled |
static int |
EXECUTION_FAILED
status value indicating job execution has completed and was not successful |
static int |
EXECUTION_PAUSED
status value indicating job execution did not occur as a result of the job being in the paused state |
static int |
EXECUTION_STARTED
status value indicating job execution is incomplete |
static int |
EXECUTION_SUCCEEDED
status value indicating job execution has completed and was successful |
static int |
EXECUTION_THRESHOLD_EXCEEDED
status value indicating job execution did not occur due to execution time exceeding the configured threshold of the job |
static int |
REPLAY_TYPE
job execution was delayed because the job was paused when the trigger initially expired |
static int |
RETRY_TYPE
job execution is the result of retrying a previously failed execution |
static int |
STATE_ACTIVE
Active job state. |
static int |
STATE_COMPLETED
The job is no longer active. |
static int |
STATE_PAUSED
Paused job state. |
static int |
STATE_UNDEF
Internal use only. |
static int |
TRIGGER_TYPE
job execution occurred as a result of the trigger firing |
Method Summary | |
JobHandle |
add(java.lang.String desc,
java.lang.String className,
Schedule schedule,
java.util.Properties properties)
Submits a job to the scheduler. |
JobHandle |
add(java.lang.String desc,
java.lang.String className,
Schedule schedule,
Trigger trigger,
java.util.Properties properties,
java.util.logging.Level logLevel,
long retryPeriod,
long executionThreshold)
Used to submit a job to the scheduler. |
JobHandle |
add(java.lang.String desc,
java.lang.String className,
Trigger trigger,
java.util.Properties properties)
Used to submit a job to the scheduler. |
void |
addBlackoutWindow(java.lang.String windowName,
Schedule schedule,
long duration)
Add's a temporal window in which all job executions are supressed. |
void |
addListener(JobHandle job,
java.lang.Class listener)
Add event listener for job specified |
void |
cancel(JobHandle job)
A submitted job may be optionally cancelled. |
java.util.Collection |
getBlackoutWindowNames()
Retrieves a collection of blackout window names |
Job |
getJob(JobHandle job)
Retrieve the metadata for the job specified. |
java.util.Collection |
getJobs()
This methods return a collection view of all jobs submitted to the scheduler. |
java.util.Collection |
getJobs(int state)
This methods return a collection view of the jobs submitted to the scheduler with the state specified. |
java.util.Collection |
getJobs(java.lang.String desc)
This methods return a collection view of the jobs submitted to the scheduler with the description specified. |
java.util.Collection |
getJobs(java.lang.String desc,
int state)
This methods return a collection view of the jobs submitted to the scheduler with the description and state specified. |
java.util.logging.Level |
getLogLevel(JobHandle job)
Returns the log level for the job specified. |
int |
getState(JobHandle job)
Returns the state of the job specified. |
void |
notify(java.util.Collection jobs,
Notification notification)
This method is used to send an asynchronous notification to one or more triggers associated with the specified jobs. |
void |
notify(Notification notification)
This method is used to send an asynchronous notification to all triggers. |
void |
pause(JobHandle job)
Used to pause any subsequent executions of the specified job. |
void |
remove(JobHandle job)
Once a job has been submitted to the scheduler it may be optionally removed. |
void |
removeBlackoutWindow(java.lang.String windowName)
Removes a blackout window as specified by window name |
void |
removeListener(JobHandle job,
java.lang.Class listener)
Remote event listener for job specified |
void |
resume(JobHandle job,
boolean replay)
Used to resume the execution of a job that was previously paused. |
void |
setLogLevel(JobHandle job,
java.util.logging.Level level)
Set the log level for the job specified to the level indicated as defined in java.util.logging.Level. |
void |
updateBlackoutWindowDuration(java.lang.String windowName,
long windowDuration)
Updates duration of blackout window as specified by window name |
void |
updateBlackoutWindowSchedule(java.lang.String windowName,
Schedule schedule)
Updates schedule of blackout window as specified by window name |
Field Detail |
public static final java.util.logging.Level DEFAULT_JOB_EXECUTION_LOG_LEVEL
public static final java.util.logging.Level DEFAULT_JOB_LOG_LEVEL
public static final java.util.logging.Level DEFAULT_ROOT_LOG_LEVEL
public static final long DEFAULT_INTERVAL_THRESHOLD_MINUTES
public static final int STATE_ACTIVE
public static final int STATE_PAUSED
public static final int STATE_COMPLETED
public static final int EXECUTION_STARTED
public static final int EXECUTION_SUCCEEDED
public static final int EXECUTION_FAILED
public static final int EXECUTION_CANCELLED
public static final int EXECUTION_BLACKOUT
public static final int EXECUTION_THRESHOLD_EXCEEDED
public static final int EXECUTION_ABORTED
public static final int EXECUTION_PAUSED
public static final int TRIGGER_TYPE
public static final int REPLAY_TYPE
public static final int RETRY_TYPE
public static final long DEFAULT_ROUNDUP_THRESHOLD_MILLIS
public static final long DEFAULT_EXECUTION_THRESHOLD_MILLIS
public static final long DEFAULT_RETRY_PERIOD_MILLIS
public static final int STATE_UNDEF
Method Detail |
public JobHandle add(java.lang.String desc, java.lang.String className, Schedule schedule, java.util.Properties properties) throws InvalidArgumentException, BlackoutException, java.rmi.RemoteException
desc
- used to specify a name or description for the job
submission. The name specified is not required to be unique.
The name specified can be used, for example, to locate this job
after submission and likewise accompanies associated log
entries. This parameter may be null.className
- specifies the associated class name for this
job. The name provided MUST specify an implementation of the
Executable interface. The class specified MUST be deployed
with the application. All submitted jobs must include a class
name.schedule
- specifies when and how often a timer expiration
notification is sent to the associated trigger.properties
- specifes one or more arguments when the job
is invoked. This parameter is optional and may be null. All
keys or values specified must implement
java.util.Serializable
.
JobHandle
object is returned.
The resultant object functions as a handle to the submitted
job. This handle may be used to administrate the job. This
object may be stored by the application for later use.
BlackoutException
- If initial expiration of job is
occurs in a blackout window.
InvalidArgumentException
- for any of the following
conditions: java.rmi.RemoteException
public JobHandle add(java.lang.String desc, java.lang.String className, Trigger trigger, java.util.Properties properties) throws InvalidArgumentException, BlackoutException, java.rmi.RemoteException
desc
- used to specify a name or description for the job
submission. The name specified is not required to be unique.
The name specified can be used, for example, to locate this job
after submission and likewise accompanies associated log
entries. This parameter may be null.className
- specifies the associated class name for this
job. The name provided MUST specify an implementation of the
Executable interface. The class specified MUST be deployed
with the application. All submitted jobs must include a class
name.trigger
- specifies which notification(s) result in the
execution of this job.properties
- specifes one or more arguments when the job
is invoked. This parameter is optional and may be null. All
keys or values specified must implement
java.util.Serializable
.
JobHandle
object is returned.
The resultant object functions as a handle to the submitted
job. This handle may be used to administrate the job. This
object may be stored by the application for later use.
BlackoutException
- if initial expiration is masked by
blackout windows.
InvalidArgumentException
- for any of the following
conditions:java.rmi.RemoteException
public JobHandle add(java.lang.String desc, java.lang.String className, Schedule schedule, Trigger trigger, java.util.Properties properties, java.util.logging.Level logLevel, long retryPeriod, long executionThreshold) throws InvalidArgumentException, BlackoutException, java.rmi.RemoteException
desc
- used to specify a name or description for the job
submission. The name specified is not required to be unique.
The name specified can be used, for example, to locate this job
after submission and likewise accompanies associated log
entries. This parameter may be null.className
- specifies the associated class name for this
job. The name provided MUST specify an implementation of the
Executable interface. The class specified MUST be deployed
with the application. All submitted jobs must include a class
name.schedule
- specifies when and how often a timer expiration
notification is sent to the associated trigger.trigger
- specifies which notification(s) result in the
execution of this job.properties
- specifes one or more arguments when the job
is invoked. This parameter is optional and may be null. All
keys or values specified must implement
java.util.Serializable
.logLevel
- specifies the log level for this job. Any of
the levels specified in java.util.logging.Level may be used a a
valid value.retryPeriod
- The period of time in millis in which a job
is retried after an execution failureexecutionThreshold
- The period of time in millis
following expected execution time, within which if a job does
not execute, causes the execution to be discarded
JobHandle
object is returned.
The resultant object functions as a handle to the submitted
job. This handle may be used to administrate the job. This
object may be stored by the application for later use.
BlackoutException
- if initial expiration is masked by
blackout windows
InvalidArgumentException
- for any of the following
conditions:java.rmi.RemoteException
public Job getJob(JobHandle job) throws JobNotFoundException, java.rmi.RemoteException
job
- job for which metadata is requested.
Job
object.
JobNotFoundException
- If the job associated with the
handle specified is undefined.
java.rmi.RemoteException
public void remove(JobHandle job) throws JobNotFoundException, java.rmi.RemoteException
job
- job to remove
JobNotFoundException
- If the job associated with the
handle specified is undefined.
java.rmi.RemoteException
public void cancel(JobHandle job) throws JobNotFoundException, IllegalOperationException, java.rmi.RemoteException
Cancellable
interface. The result of invoking
this method is that the cancel
method is invoked
on all currently executing job instances.
Successful invocation of this method does not result
in terminating any outstanding execution(s) of this job.
job
- job to cancel
JobNotFoundException
- If the job associated with the
handle specified is undefined.
IllegalOperationException
- for any of the following
conditions:Cancellable
interface.java.rmi.RemoteException
public void pause(JobHandle job) throws JobNotFoundException, IllegalOperationException, java.rmi.RemoteException
job
- job to pause
JobNotFoundException
- If the job associated with the
handle specified is undefined.
IllegalOperationException
- If the job is not in the
state STATE_ACTIVE
.
java.rmi.RemoteException
public void resume(JobHandle job, boolean replay) throws JobNotFoundException, IllegalOperationException, java.rmi.RemoteException
job
- job to pausereplay
- if true the job execution is replayed once if the
associated trigger fired, otherwise execution is skipped.
JobNotFoundException
- If the job associated with the
handle specified is undefined.
IllegalOperationException
- If the job is not in the
state STATE_PAUSED
.
java.rmi.RemoteException
public int getState(JobHandle job) throws JobNotFoundException, java.rmi.RemoteException
job
- job for which the state is requested.
STATE_ACTIVE
if the job is active,
STATE_PAUSED
if the job has been paused, or
STATE_COMPLETED
if the job is no longer active.
JobNotFoundException
- If the job associated with the
handle specified is undefined.
java.rmi.RemoteException
public void setLogLevel(JobHandle job, java.util.logging.Level level) throws JobNotFoundException, InvalidArgumentException, java.rmi.RemoteException
Level.WARNING
, log entries are written under
the following conditions:JobExecutionException
.RuntimeException
.Level.FINE
the following additional information
is written to the log:Level.FINER
the following additional information
is written to the log:Level.FINEST
the following additional
information is written to the log:Level.FINER
. All log
entries are written to the hosting applications log file. Each
log entry contains the following:
job
- job to set the log level.level
- any level as defined in java.util.logging.Level
JobNotFoundException
- If the job associated with the
handle specified is undefined.
InvalidArgumentException
- If the log level specified is
not one of the allowed values.
java.rmi.RemoteException
public java.util.logging.Level getLogLevel(JobHandle job) throws JobNotFoundException, java.rmi.RemoteException
job
- job for which the log level is requested.
Level.WARNING
, log entries are written under
the following conditions:JobExecutionException
.RuntimeException
.Level.FINE
the following additional information
is written to the log:Level.FINER
the following additional information
is written to the log:Level.FINEST
the following additional
information is written to the log:JobNotFoundException
- If the job associated with the
handle specified is undefined.
java.rmi.RemoteException
public java.util.Collection getJobs() throws java.rmi.RemoteException
java.rmi.RemoteException
public java.util.Collection getJobs(java.lang.String desc) throws java.rmi.RemoteException
desc
- Retrieve all jobs with the description specified.
java.rmi.RemoteException
public java.util.Collection getJobs(int state) throws InvalidArgumentException, java.rmi.RemoteException
state
- Retrieve all job with the value specified.
InvalidArgumentException
- if the state specified is invalid.
java.rmi.RemoteException
public java.util.Collection getJobs(java.lang.String desc, int state) throws InvalidArgumentException, java.rmi.RemoteException
desc
- Retrieve all jobs with the description specified.state
- Retrieve all job with the value specified.
InvalidArgumentException
- if the state specified is invalid.
java.rmi.RemoteException
public void notify(Notification notification) throws java.rmi.RemoteException
java.rmi.RemoteException
public void notify(java.util.Collection jobs, Notification notification) throws JobNotFoundException, java.rmi.RemoteException
jobs
- a collection of one or more JobHandle
objects.
JobNotFoundException
- If one or more of the jobs
specified is undefined.
java.lang.ClassCastException
- If one or more of the objects
specified is not a JobHandle
object.
java.rmi.RemoteException
public void addBlackoutWindow(java.lang.String windowName, Schedule schedule, long duration) throws InvalidArgumentException, BlackoutException, java.rmi.RemoteException
windowName
- name of the the new window.schedule
- the schedule of the start time of the window.
Note that the schedule may repeating as in the case of a
IntervalSchedule
.duration
- duration in minutes of the specified window.
BlackoutException
- if window of the same name already exists.
InvalidArgumentException
- if schedule and duration are
incompatible or if the window will never take effect.
java.rmi.RemoteException
public void removeBlackoutWindow(java.lang.String windowName) throws WindowNotFoundException, java.rmi.RemoteException
windowName
- name of the window to be removed.
WindowNotFoundException
- if a window of specified name
does not exist
java.rmi.RemoteException
public void updateBlackoutWindowSchedule(java.lang.String windowName, Schedule schedule) throws WindowNotFoundException, InvalidArgumentException, java.rmi.RemoteException
windowName
- name of the window to be removed.
WindowNotFoundException
- if a window of specified name
does not exist
InvalidArgumentException
- if schedule and duration are
incompatible or if the window will never take effect.
java.rmi.RemoteException
public void updateBlackoutWindowDuration(java.lang.String windowName, long windowDuration) throws WindowNotFoundException, InvalidArgumentException, java.rmi.RemoteException
windowName
- name of the window to be removed.
WindowNotFoundException
- if a window of specified name
does not exist
InvalidArgumentException
- if schedule and duration are
incompatible or if the window will never take effect.
java.rmi.RemoteException
public java.util.Collection getBlackoutWindowNames() throws java.rmi.RemoteException
java.rmi.RemoteException
public void addListener(JobHandle job, java.lang.Class listener) throws JobNotFoundException, InvalidArgumentException, java.rmi.RemoteException
job
- job to which listenr is added.listener
- the listener class
JobNotFoundException
- If the job associated with the
handle specified is undefined.
InvalidArgumentException
- If fails to create a listener instance.
java.rmi.RemoteException
public void removeListener(JobHandle job, java.lang.Class listener) throws JobNotFoundException, ListenerNotFoundException, java.rmi.RemoteException
job
- job to which listenr is added.listener
- the listener class
JobNotFoundException
- If the job associated with the
handle specified is undefined.
ListenerNotFoundException
- If listener instance
specified by class is not found
java.rmi.RemoteException
|
Oracle Containers for J2EE Job Scheduler Java API Reference 10g Release 3 (10.1.3) B16026-01 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |