com.ibm.bpe.api
Class TimerSpecification
- java.lang.Object
com.ibm.bpe.api.TimerSpecification
All implemented interfaces:
java.io.Serializable
- public final class TimerSpecification
- extends java.lang.Object
- implements java.io.Serializable
rescheduling
the expiration time
of a waiting activity.
Since:
7.0
See Also:
Field Summary
Modifier and Type | Field and Description |
---|---|
|
COPYRIGHT
|
|
TIMER_SPECIFICATION_IMMEDIATE
An out-of-the-box timer specification that can be used as a timer that is triggered immediately.
|
|
TIMER_SPECIFICATION_INFINITE
An out-of-the-box timer specification that can be used as a timer that is never triggered.
|
|
TYPE_DEADLINE
Symbolic constant for the type of a timer specification that uses a deadline.
|
|
TYPE_DURATION
Symbolic constant for the type of a timer specification that uses a duration.
|
|
TYPE_IMMEDIATE
Symbolic constant for the type of a timer specification that is triggered immediately.
|
|
TYPE_INFINITE
Symbolic constant for the type of a timer specification that is never triggered,
that is, no timer is set up.
|
|
TYPE_TIMEOUT
Symbolic constant for the type of a timer specification that uses a timeout.
|
Constructor Summary
Constructor and Description |
---|
TimerSpecification()
Default constructor that sets up an infinite time, that is, no timer is set up.
|
TimerSpecification(java.util.Calendar deadline)
Constructor that uses a deadline as timer specification.
|
TimerSpecification(java.lang.Integer duration)
Constructor that uses a duration as timer specification.
|
TimerSpecification(java.lang.String timeoutExpression,java.lang.String calendarName,java.lang.String JNDINameOfCalendar)
Constructor that uses a timeout expression as timer specification.
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
getCalendarName()
Returns the name of the calendar used for the timeout expression.
|
|
getDeadline()
Returns the deadline specification.
|
|
getDuration()
Returns the duration specification in seconds.
|
|
getJNDINameOfCalendar()
Returns the JNDI name of a user-defined calendar used for the timeout expression.
|
|
getTimeoutExpression()
Returns a calendar specific timeout expression.
|
|
getType()
Returns the type of the timer specification.
|
|
toString()
Returns a string representation of the TimerSpecification object.
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail
COPYRIGHT
- public static final java.lang.String COPYRIGHT
See Also:
TYPE_IMMEDIATE
- public static final int TYPE_IMMEDIATE
Symbolic constant for the type of a timer specification that is triggered immediately.
See Also:
TYPE_DURATION
- public static final int TYPE_DURATION
Symbolic constant for the type of a timer specification that uses a duration.
See Also:
TYPE_DEADLINE
- public static final int TYPE_DEADLINE
Symbolic constant for the type of a timer specification that uses a deadline.
See Also:
TYPE_TIMEOUT
- public static final int TYPE_TIMEOUT
Symbolic constant for the type of a timer specification that uses a timeout.
See Also:
TYPE_INFINITE
- public static final int TYPE_INFINITE
Symbolic constant for the type of a timer specification that is never triggered,
that is, no timer is set up.
See Also:
TIMER_SPECIFICATION_IMMEDIATE
- public static final TimerSpecification TIMER_SPECIFICATION_IMMEDIATE
An out-of-the-box timer specification that can be used as a timer that is triggered immediately.
TIMER_SPECIFICATION_INFINITE
- public static final TimerSpecification TIMER_SPECIFICATION_INFINITE
An out-of-the-box timer specification that can be used as a timer that is never triggered.
Constructor Detail
TimerSpecification
- public TimerSpecification()
Default constructor that sets up an infinite time, that is, no timer is set up.
TimerSpecification
- public TimerSpecification(java.lang.Integer duration)
- throws EngineParameterNullException
Constructor that uses a duration as timer specification.
Parameters:
duration
- The duration in seconds that may pass until, for example, an activity instance expires. Throws:
TimerSpecification
- public TimerSpecification(java.util.Calendar deadline)
- throws EngineParameterNullException
Constructor that uses a deadline as timer specification.
Parameters:
deadline
- The time up to which an object is in some state, for example, the time an
activity instance is waiting for an event. When the specified
time has been reached, the object changes its state.
For example, a waiting activity continues navigation, that is, returns to
the running state. Throws:
TimerSpecification
- public TimerSpecification(java.lang.String timeoutExpression,
- java.lang.String calendarName,
- java.lang.String JNDINameOfCalendar)
- throws EngineParameterNullException
Constructor that uses a timeout expression as timer specification.
Parameters:
timeoutExpression
- A calendar specific expression that is used to calculate the time up to when
an object is in some state. When the specified
time has been reached, the object changes its state.
For example, a waiting activity continues navigation, that is, returns to
the running state. calendarName
- The name of a user-provided calendar. If the JNDI name of the calendar is not
specified, the name may be "SIMPLE" or "CRON" to select one of WebSphere's
calendars. If neither a calendar name nor a JNDI name is specified, then the WebSphere
default calendar (SIMPLE) is used. JNDINameOfCalendar
- The JNDI name of the EJB providing the user's calendar; may be null so that
one of WebSphere's calendars is used. Throws:
Method Detail
getDuration
- public java.lang.Integer getDuration( )
Returns the duration specification in seconds.
Returns null if a duration has not been specified.
Returns:
The duration specification.
getDeadline
- public java.util.Calendar getDeadline( )
Returns the deadline specification.
Returns null if a deadline has not been specified.
Returns:
The deadline specification.
getTimeoutExpression
- public java.lang.String getTimeoutExpression( )
Returns a calendar specific timeout expression.
Returns null if a timeout expression has not been specified.
For details on calendars refer to the WebSphere Application Server documentation.
Returns:
The timeout expression.
getCalendarName
- public java.lang.String getCalendarName( )
Returns the name of the calendar used for the timeout expression.
If not set, null is returned and the WebSphere default calendar is used. If a JNDI name
for a user-defined calendar is specified, then the calendar name is the name of a
method implementing that user-defined calendar - see
getJNDINameOfCalendar
.
For details on calendars refer to the WebSphere Application Server documentation.
Returns:
The name of the calendar used for the timeout expression.
getJNDINameOfCalendar
- public java.lang.String getJNDINameOfCalendar( )
Returns the JNDI name of a user-defined calendar used for the timeout expression. If
not set, null is returned and a WebSphere supported calendar is used -
see
getCalendarName
.
For details on calendars refer to the WebSphere Application Server documentation.
Returns:
The JNDI name of the calendar used for the timeout expression.
getType
- public int getType()
Returns the type of the timer specification.
Returns:
The type of the timer specification,
"TYPE_DURATION" means that a duration is set as timer specification.
"TYPE_DEADLINE" means that a deadline is set as timer specification.
"TYPE_TIMEOUT" means that a timeout expression is set as timer specification.
"TYPE_INFINITE" means that no timer is set up.
"TYPE_IMMEDIATE" means that the timeout occurs immediately.
"TYPE_DURATION" means that a duration is set as timer specification.
"TYPE_DEADLINE" means that a deadline is set as timer specification.
"TYPE_TIMEOUT" means that a timeout expression is set as timer specification.
"TYPE_INFINITE" means that no timer is set up.
"TYPE_IMMEDIATE" means that the timeout occurs immediately.
toString
- public java.lang.String toString( )
Returns a string representation of the TimerSpecification object.
Overrides:
toString
in class java.lang.Object
Returns:
String -
A string representation of the object.