IT. Expert System.

Java Enterprise Edition (EE)

Timer


javax.ejb
Interface Timer

public interface Timer

The Timer interface contains information about a timer that was created through the EJB Timer Service.

Method Summary
 void cancel()
          Cause the timer and all its associated expiration notifications to be cancelled.
 TimerHandle getHandle()
          Get a serializable handle to the timer.
 java.io.Serializable getInfo()
          Get the information associated with the timer at the time of creation.
 java.util.Date getNextTimeout()
          Get the point in time at which the next timer expiration is scheduled to occur.
 ScheduleExpression getSchedule()
          Get the schedule expression corresponding to this timer.
 long getTimeRemaining()
          Get the number of milliseconds that will elapse before the next scheduled timer expiration.
 boolean isCalendarTimer()
          Query whether this timer is a calendar-based timer.
 boolean isPersistent()
          Query whether this timer has persistent semantics.
 

Method Detail

cancel

void cancel()
            throws java.lang.IllegalStateException,
                   NoSuchObjectLocalException,
                   EJBException
Cause the timer and all its associated expiration notifications to be cancelled.

Throws:
java.lang.IllegalStateException - If this method is invoked while the instance is in a state that does not allow access to this method.
NoSuchObjectLocalException - If invoked on a timer that has expired or has been cancelled.
EJBException - If this method could not complete due to a system-level failure.

getTimeRemaining

long getTimeRemaining()
                      throws java.lang.IllegalStateException,
                             NoSuchObjectLocalException,
                             NoMoreTimeoutsException,
                             EJBException
Get the number of milliseconds that will elapse before the next scheduled timer expiration.

Returns:
the number of milliseconds that will elapse before the next scheduled timer expiration.
Throws:
java.lang.IllegalStateException - If this method is invoked while the instance is in a state that does not allow access to this method.
NoSuchObjectLocalException - If invoked on a timer that has expired or has been cancelled.
javax.ejb.NoMoreTimeoutsExceptions - Indicates that the timer has no future timeouts
EJBException - If this method could not complete due to a system-level failure.
NoMoreTimeoutsException

getNextTimeout

java.util.Date getNextTimeout()
                              throws java.lang.IllegalStateException,
                                     NoSuchObjectLocalException,
                                     NoMoreTimeoutsException,
                                     EJBException
Get the point in time at which the next timer expiration is scheduled to occur.

Returns:
the point in time at which the next timer expiration is scheduled to occur.
Throws:
java.lang.IllegalStateException - If this method is invoked while the instance is in a state that does not allow access to this method.
NoSuchObjectLocalException - If invoked on a timer that has expired or has been cancelled.
javax.ejb.NoMoreTimeoutsExceptions - Indicates that the timer has no future timeouts
EJBException - If this method could not complete due to a system-level failure.
NoMoreTimeoutsException

getSchedule

ScheduleExpression getSchedule()
                               throws java.lang.IllegalStateException,
                                      NoSuchObjectLocalException,
                                      EJBException
Get the schedule expression corresponding to this timer.

Throws:
java.lang.IllegalStateException - If this method is invoked while the instance is in a state that does not allow access to this method. Also thrown if invoked on a timer that is not a calendar-based timer.
NoSuchObjectLocalException - If invoked on a timer that has expired or has been cancelled.
EJBException - If this method could not complete due to a system-level failure.

isPersistent

boolean isPersistent()
                     throws java.lang.IllegalStateException,
                            NoSuchObjectLocalException,
                            EJBException
Query whether this timer has persistent semantics.

Returns:
true if this timer has persistent guarantees.
Throws:
java.lang.IllegalStateException - If this method is invoked while the instance is in a state that does not allow access to this method.
NoSuchObjectLocalException - If invoked on a timer that has expired or has been cancelled.
EJBException - If this method could not complete due to a system-level failure.

isCalendarTimer

boolean isCalendarTimer()
                        throws java.lang.IllegalStateException,
                               NoSuchObjectLocalException,
                               EJBException
Query whether this timer is a calendar-based timer.

Returns:
true if this timer is a calendar-based timer.
Throws:
java.lang.IllegalStateException - If this method is invoked while the instance is in a state that does not allow access to this method.
NoSuchObjectLocalException - If invoked on a timer that has expired or has been cancelled.
EJBException - If this method could not complete due to a system-level failure.

getInfo

java.io.Serializable getInfo()
                             throws java.lang.IllegalStateException,
                                    NoSuchObjectLocalException,
                                    EJBException
Get the information associated with the timer at the time of creation.

Returns:
The Serializable object that was passed in at timer creation, or null if the info argument passed in at timer creation was null.
Throws:
java.lang.IllegalStateException - If this method is invoked while the instance is in a state that does not allow access to this method.
NoSuchObjectLocalException - If invoked on a timer that has expired or has been cancelled.
EJBException - If this method could not complete due to a system-level failure.

getHandle

TimerHandle getHandle()
                      throws java.lang.IllegalStateException,
                             NoSuchObjectLocalException,
                             EJBException
Get a serializable handle to the timer. This handle can be used at a later time to re-obtain the timer reference.

Returns:
a serializable handle to the timer.
Throws:
java.lang.IllegalStateException - If this method is invoked while the instance is in a state that does not allow access to this method. Also thrown if invoked on a non-persistent timer.
NoSuchObjectLocalException - If invoked on a timer that has expired or has been cancelled.
EJBException - If this method could not complete due to a system-level failure.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 15670 / 248376314. Delta: 0.01425 с