com.ibm.bpe.api

Class TimerSpecification

  1. java.lang.Object
  2. extended bycom.ibm.bpe.api.TimerSpecification
All implemented interfaces:
java.io.Serializable

  1. public final class TimerSpecification
  2. extends java.lang.Object
  3. implements java.io.Serializable
Describes options that can be used to set timers. For example, you can use this specification when rescheduling the expiration time of a waiting activity.
Since:
7.0
See Also:
Serialized Form

Field Summary

Modifier and Type Field and Description
  1. static
  2. java.lang.String
COPYRIGHT
  1. static
  2. TimerSpecification
TIMER_SPECIFICATION_IMMEDIATE
An out-of-the-box timer specification that can be used as a timer that is triggered immediately.
  1. static
  2. TimerSpecification
TIMER_SPECIFICATION_INFINITE
An out-of-the-box timer specification that can be used as a timer that is never triggered.
  1. static
  2. int
TYPE_DEADLINE
Symbolic constant for the type of a timer specification that uses a deadline.
  1. static
  2. int
TYPE_DURATION
Symbolic constant for the type of a timer specification that uses a duration.
  1. static
  2. int
TYPE_IMMEDIATE
Symbolic constant for the type of a timer specification that is triggered immediately.
  1. static
  2. int
TYPE_INFINITE
Symbolic constant for the type of a timer specification that is never triggered, that is, no timer is set up.
  1. static
  2. int
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
  1. java.lang.String
getCalendarName()
Returns the name of the calendar used for the timeout expression.
  1. java.util.Calendar
getDeadline()
Returns the deadline specification.
  1. java.lang.Integer
getDuration()
Returns the duration specification in seconds.
  1. java.lang.String
getJNDINameOfCalendar()
Returns the JNDI name of a user-defined calendar used for the timeout expression.
  1. java.lang.String
getTimeoutExpression()
Returns a calendar specific timeout expression.
  1. int
getType()
Returns the type of the timer specification.
  1. java.lang.String
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

  1. public static final java.lang.String COPYRIGHT
See Also:

TYPE_IMMEDIATE

  1. public static final int TYPE_IMMEDIATE
Symbolic constant for the type of a timer specification that is triggered immediately.
See Also:

TYPE_DURATION

  1. public static final int TYPE_DURATION
Symbolic constant for the type of a timer specification that uses a duration.
See Also:

TYPE_DEADLINE

  1. public static final int TYPE_DEADLINE
Symbolic constant for the type of a timer specification that uses a deadline.
See Also:

TYPE_TIMEOUT

  1. public static final int TYPE_TIMEOUT
Symbolic constant for the type of a timer specification that uses a timeout.
See Also:

TYPE_INFINITE

  1. 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

  1. 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

  1. 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

  1. public TimerSpecification()
Default constructor that sets up an infinite time, that is, no timer is set up.

TimerSpecification

  1. public TimerSpecification(java.lang.Integer duration)
  2. 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

  1. public TimerSpecification(java.util.Calendar deadline)
  2. 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

  1. public TimerSpecification(java.lang.String timeoutExpression,
  2. java.lang.String calendarName,
  3. java.lang.String JNDINameOfCalendar)
  4. 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

  1. 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

  1. public java.util.Calendar getDeadline( )
Returns the deadline specification. Returns null if a deadline has not been specified.
Returns:
The deadline specification.

getTimeoutExpression

  1. 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

  1. 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

  1. 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

  1. 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.

toString

  1. 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.