org.jboss.shrinkwrap.descriptor.api.ejbjar31
Interface TimerType<T>

All Superinterfaces:
org.jboss.shrinkwrap.descriptor.api.Child<T>
All Known Implementing Classes:
TimerTypeImpl

public interface TimerType<T>
extends org.jboss.shrinkwrap.descriptor.api.Child<T>

This interface defines the contract for the timerType xsd type

Original Documentation:



The timerType specifies an enterprise bean timer. Each
timer is automatically created by the container upon
deployment. Timer callbacks occur based on the
schedule attributes. All callbacks are made to the
timeout-method associated with the timer.

A timer can have an optional start and/or end date. If
a start date is specified, it takes precedence over the
associated timer schedule such that any matching
expirations prior to the start time will not occur.
Likewise, no matching expirations will occur after any
end date. Start/End dates are specified using the
XML Schema dateTime type, which follows the ISO-8601
standard for date(and optional time-within-the-day)
representation.

An optional flag can be used to control whether
this timer has persistent(true) delivery semantics or
non-persistent(false) delivery semantics. If not specified,
the value defaults to persistent(true).

A time zone can optionally be associated with a timer.
If specified, the timer's schedule is evaluated in the context
of that time zone, regardless of the default time zone in which
the container is executing. Time zones are specified as an
ID string. The set of required time zone IDs is defined by
the Zone Name(TZ) column of the public domain zoneinfo database.

An optional info string can be assigned to the timer and
retrieved at runtime through the Timer.getInfo() method.

The timerType can only be specified on stateless session
beans, singleton session beans, and message-driven beans.


Since:
Generation date :2011-07-19T22:55:02.759+02:00
Author:
Ralf Battenfeld

Method Summary
 java.util.List<java.lang.String> getDescriptionList()
          Returns all description elements
 java.util.Date getEnd()
          Returns the end element
 java.lang.String getInfo()
          Returns the info element
 java.util.Date getStart()
          Returns the start element
 java.lang.String getTimezone()
          Returns the timezone element
 java.lang.Boolean isPersistent()
          Returns the persistent element
 TimerType<T> removeAllDescription()
          Removes the description element
 TimerType<T> removeEnd()
          Removes the end element
 TimerType<T> removeInfo()
          Removes the info element
 TimerType<T> removePersistent()
          Removes the persistent element
 TimerType<T> removeSchedule()
          Removes the schedule element
 TimerType<T> removeStart()
          Removes the start element
 TimerType<T> removeTimeoutMethod()
          Removes the timeout-method element
 TimerType<T> removeTimezone()
          Removes the timezone element
 TimerScheduleType<TimerType<T>> schedule()
          If not already created, a new schedule element will be created and returned.
 TimerType<T> setDescription(java.lang.String description)
          Creates a new description element
 TimerType<T> setDescriptionList(java.lang.String... values)
          Creates for all String objects representing description elements, a new description element
 TimerType<T> setEnd(java.util.Date end)
          If not already created, a new end element with the given value will be created.
 TimerType<T> setInfo(java.lang.String info)
          If not already created, a new info element with the given value will be created.
 TimerType<T> setPersistent(java.lang.Boolean persistent)
          If not already created, a new persistent element with the given value will be created.
 TimerType<T> setStart(java.util.Date start)
          If not already created, a new start element with the given value will be created.
 TimerType<T> setTimezone(java.lang.String timezone)
          If not already created, a new timezone element with the given value will be created.
 NamedMethodType<TimerType<T>> timeoutMethod()
          If not already created, a new timeout-method element will be created and returned.
 
Methods inherited from interface org.jboss.shrinkwrap.descriptor.api.Child
up
 

Method Detail

setDescription

TimerType<T> setDescription(java.lang.String description)
Creates a new description element

Returns:
the current instance of TimerType

setDescriptionList

TimerType<T> setDescriptionList(java.lang.String... values)
Creates for all String objects representing description elements, a new description element

Parameters:
list - of description objects
Returns:
the current instance of TimerType

removeAllDescription

TimerType<T> removeAllDescription()
Removes the description element

Returns:
the current instance of TimerType

getDescriptionList

java.util.List<java.lang.String> getDescriptionList()
Returns all description elements

Returns:
list of description

removeSchedule

TimerType<T> removeSchedule()
Removes the schedule element

Returns:
the current instance of TimerType

schedule

TimerScheduleType<TimerType<T>> schedule()
If not already created, a new schedule element will be created and returned. Otherwise, the existing schedule element will be returned.

Returns:
the node defined for the element schedule

setStart

TimerType<T> setStart(java.util.Date start)
If not already created, a new start element with the given value will be created. Otherwise, the existing start element will be updated with the given value.

Parameters:
java.util.Date -
Returns:
the current instance of TimerType

removeStart

TimerType<T> removeStart()
Removes the start element

Returns:
the current instance of TimerType

getStart

java.util.Date getStart()
Returns the start element

Returns:
the node defined for the element start

setEnd

TimerType<T> setEnd(java.util.Date end)
If not already created, a new end element with the given value will be created. Otherwise, the existing end element will be updated with the given value.

Parameters:
java.util.Date -
Returns:
the current instance of TimerType

removeEnd

TimerType<T> removeEnd()
Removes the end element

Returns:
the current instance of TimerType

getEnd

java.util.Date getEnd()
Returns the end element

Returns:
the node defined for the element end

removeTimeoutMethod

TimerType<T> removeTimeoutMethod()
Removes the timeout-method element

Returns:
the current instance of TimerType

timeoutMethod

NamedMethodType<TimerType<T>> timeoutMethod()
If not already created, a new timeout-method element will be created and returned. Otherwise, the existing timeout-method element will be returned.

Returns:
the node defined for the element timeout-method

setPersistent

TimerType<T> setPersistent(java.lang.Boolean persistent)
If not already created, a new persistent element with the given value will be created. Otherwise, the existing persistent element will be updated with the given value.

Returns:
the current instance of TimerType

removePersistent

TimerType<T> removePersistent()
Removes the persistent element

Returns:
the current instance of TimerType

isPersistent

java.lang.Boolean isPersistent()
Returns the persistent element

Returns:
the node defined for the element persistent

setTimezone

TimerType<T> setTimezone(java.lang.String timezone)
If not already created, a new timezone element with the given value will be created. Otherwise, the existing timezone element will be updated with the given value.

Returns:
the current instance of TimerType

removeTimezone

TimerType<T> removeTimezone()
Removes the timezone element

Returns:
the current instance of TimerType

getTimezone

java.lang.String getTimezone()
Returns the timezone element

Returns:
the node defined for the element timezone

setInfo

TimerType<T> setInfo(java.lang.String info)
If not already created, a new info element with the given value will be created. Otherwise, the existing info element will be updated with the given value.

Returns:
the current instance of TimerType

removeInfo

TimerType<T> removeInfo()
Removes the info element

Returns:
the current instance of TimerType

getInfo

java.lang.String getInfo()
Returns the info element

Returns:
the node defined for the element info