|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for all scheduled tasks.
Contains the data to be used when scheduling a task using the Scheduler.create
method.
BeanTaskInfo
,
MessageTaskInfo
Field Summary |
---|
Fields inherited from interface com.ibm.websphere.scheduler.TaskStatus |
---|
CANCELLED, COMPLETE, INVALID, RUNNING, SCHEDULED, serialVersionUID, SUSPENDED |
Method Summary | |
---|---|
boolean |
getAutoPurge()
Get the AutoPurge value for this task. |
java.lang.String |
getName()
Get the name of the task. |
NotificationSinkHome |
getNotificationSink()
Gets the NotificationSinkHome associated with this TaskInfo. |
int |
getNumberOfRepeats()
Get the number of repeats that were set with setNumberOfRepeats . |
java.lang.String |
getRepeatInterval()
Get the UserCalendar repeat interval. |
java.lang.String |
getStartByInterval()
Get the start-by interval that was set with setStartByInterval |
java.util.Date |
getStartTime()
Get the start date and time for this task that was set with setStartTime . |
java.lang.String |
getStartTimeInterval()
Get the UserCalendar start time interval that was set with setStartTime |
java.lang.String |
getUserCalendarJNDIName()
Get the UserCalendar JNDI name |
java.lang.String |
getUserCalendarSpecifier()
Get the UserCalendar specifier. |
void |
setAutoPurge(boolean purge)
Specifies that upon completion, the task will be deleted from the persistent store. |
void |
setInitialState(int initialState)
Set the state that this task should default to when initially created. |
void |
setName(java.lang.String name)
Set the name of the task. |
void |
setNotificationSink(NotificationSinkHome home)
Specifies a callback which will be invoked for all events. |
void |
setNotificationSink(NotificationSinkHome home,
int eventMask)
Specifies a callback which will be invoked based upon the requested filter. |
void |
setNumberOfRepeats(int repeatCount)
Sets the number of times this task will be repeated: |
void |
setRepeatInterval(java.lang.String userCalendarDelta)
Specifies a UserCalendar interval which represents the time between firings. |
void |
setStartByInterval(java.lang.String userCalendarDelta)
Specifies that if the task has not executed within the specified UserCalendar interval, the
associated work should not be fired. |
void |
setStartTime(java.util.Date start)
Sets the start date and time for this task. |
void |
setStartTimeInterval(java.lang.String userCalendarDelta)
Sets the start time for the task given a UserCalendar interval. |
void |
setUserCalendar(java.lang.String homeJNDIName,
java.lang.String specifier)
Set the UserCalendar for this task. |
void |
validate()
Validates various attributes of a TaskInfo. |
Methods inherited from interface com.ibm.websphere.scheduler.TaskStatus |
---|
getNextFireTime, getRepeatsLeft, getStatus, getTaskId, getTimeCreated |
Method Detail |
public void setStartByInterval(java.lang.String userCalendarDelta)
UserCalendar
interval, the
associated work should not be fired. The next fire time will still be calculated
and if applicable, the repeat count decremented.
userCalendarDelta
- the UserCalendar
interval used to apply to each calculated fire time.UserCalendar
public java.lang.String getStartByInterval()
setStartByInterval
public void setStartTime(java.util.Date start)
start
- the Date
to use for the start date and time.public java.util.Date getStartTime()
setStartTime
.
public void setStartTimeInterval(java.lang.String userCalendarDelta)
UserCalendar
interval. The actual time
will be calculated during task creation using the UserCalendar
associated with
this task info, or if unspecified, the default calendar.
userCalendarDelta
- the UserCalendar
interval used to apply to the current time.UserCalendar
public java.lang.String getStartTimeInterval()
UserCalendar
start time interval that was set with setStartTime
UserCalendar
start time interval.public void setNumberOfRepeats(int repeatCount)
repeatCount
- the total number of times to execute the task.public int getNumberOfRepeats()
setNumberOfRepeats
.
setNumberOfRepeats
.public void setRepeatInterval(java.lang.String userCalendarDelta)
UserCalendar
interval which represents the time between firings. The
UserCalendar
used for calculations can be specified with the setUserCalendar
and
setUserCalendarSpecifier
methods. If no calendar is specified, the DefaultUserCalendar
calendar will be used. If this repeat interval is less than the scheduler's poll interval,
then the repeat interval will be ignored and the poll interval will be used.
userCalendarDelta
- the UserCalendar
interval used to apply to each calculated fire time.UserCalendar
public java.lang.String getRepeatInterval()
UserCalendar
repeat interval.
UserCalendar
repeat interval.public void setUserCalendar(java.lang.String homeJNDIName, java.lang.String specifier) throws UserCalendarInvalid
UserCalendar
for this task. If not set, then the default UserCalendar
bean is used without a specifier.
homeJNDIName
- the JNDI name used to retrieve the Home interface of a UserCalendar implementation object. If null or
an empty string, the DefaultUserCalendar is used.specifier
- optional name of an individual calendar within the UserCalendar bean.
UserCalendarInvalid
- The specified JNDI name for the UserCalendarHome could not be looked-up or is of the wrong type.UserCalendar
public java.lang.String getUserCalendarJNDIName()
UserCalendar
JNDI name
UserCalendar
JNDI name.public java.lang.String getUserCalendarSpecifier()
UserCalendar
specifier.
UserCalendar
specifier.public void setNotificationSink(NotificationSinkHome home) throws NotificationSinkInvalid
home
- A stateless session bean which uses NotificationSink remote
interface.
NotificationSinkInvalid
- The HomeHandle for the session bean cannot be retrieved or the home is null;NotificationSink
,
TaskNotificationInfo
public void setNotificationSink(NotificationSinkHome home, int eventMask) throws NotificationSinkInvalid
TaskNotificationInfo
constants.
home
- A stateless session bean which uses NotificationSink remote
interface.eventMask
- the events to monitor for. To monitor multiple events, you can OR the event types
together. The default is to be notified on all events.
NotificationSinkInvalid
- The HomeHandle for the session bean cannot be retrieved or the home is null;NotificationSink
,
TaskNotificationInfo
public NotificationSinkHome getNotificationSink() throws NotificationSinkInvalid
NotificationSinkInvalid
- The HomeHandle for the session bean cannot be retrieved or the home is null;NotificationSink
public void validate() throws UserCalendarSpecifierInvalid, UserCalendarPeriodInvalid, UserCalendarInvalid, TaskInvalid, NotificationSinkInvalid
UserCalendarSpecifierInvalid
- The specified UserCalendar calendar name for the specified UserCalendar is not valid.
UserCalendarPeriodInvalid
- The specified UserCalendar period for the specified UserCalendar is not valid.
UserCalendarInvalid
- The specified JNDI name for the UserCalendarHome could not be looked-up or is of the wrong type.
TaskInvalid
- The TaskInfo object is missing or has incorrect data.
NotificationSinkInvalid
- The HomeHandle for the session bean cannot be retrieved or the home is null;public void setName(java.lang.String name)
name
- the label of this taskpublic java.lang.String getName()
getName
in interface TaskStatus
setName
.setName(java.lang.String)
public void setAutoPurge(boolean purge)
Default is true.
purge
- if true, automatically remove completed tasks.public boolean getAutoPurge()
public void setInitialState(int initialState)
By default each scheduled instance is immediately scheduled (TaskStatus.SCHEDULED
).
The only valid parameters for this method are TaskStatus.SUSPENDED
and
TaskStatus.SCHEDULED
This value does not persist with the task, therefore there is no "get" method for this setting.
initialState
- the state to set the newly-created task to.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |