Source Code Cross Referenced for TimerService.java in  » Testing » Ejb3Unit » javax » ejb » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Testing » Ejb3Unit » javax.ejb 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * EasyBeans
003:         * Copyright (C) 2006 Bull S.A.S.
004:         * Contact: easybeans@objectweb.org
005:         *
006:         * This library is free software; you can redistribute it and/or
007:         * modify it under the terms of the GNU Lesser General Public
008:         * License as published by the Free Software Foundation; either
009:         * version 2.1 of the License, or any later version.
010:         *
011:         * This library is distributed in the hope that it will be useful,
012:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
013:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
014:         * Lesser General Public License for more details.
015:         *
016:         * You should have received a copy of the GNU Lesser General Public
017:         * License along with this library; if not, write to the Free Software
018:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
019:         * USA
020:         *
021:         * --------------------------------------------------------------------------
022:         * $Id: TimerService.java 1311 2007-02-13 17:33:45Z benoitf $
023:         * --------------------------------------------------------------------------
024:         */package javax.ejb;
025:
026:        import java.io.Serializable;
027:        import java.util.Collection;
028:        import java.util.Date;
029:
030:        /**
031:         * The TimerService interface provides enterprise bean components with access to
032:         * the container-provided Timer Service. The EJB Timer Service allows entity
033:         * beans, stateless session beans, and message-driven beans to be registered for
034:         * timer callback events at a specified time, after a specified elapsed time, or
035:         * after a specified interval.
036:         * @see <a href="http://www.jcp.org/en/jsr/detail?id=220">EJB 3.0 specification</a>
037:         * @author Florent Benoit
038:         */
039:        public interface TimerService {
040:
041:            /**
042:             * Create a single-action timer that expires after a specified duration.
043:             * @param duration The number of milliseconds that must elapse before the
044:             *        timer expires.
045:             * @param info Application information to be delivered along with the timer
046:             *        expiration notification. This can be null.
047:             * @return The newly created Timer.
048:             * @throws IllegalArgumentException If duration is negative
049:             * @throws IllegalStateException If this method is invoked while the
050:             *         instance is in a state that does not allow access to this method.
051:             * @throws EJBException If this method fails due to a system-level failure.
052:             */
053:            Timer createTimer(final long duration, final Serializable info)
054:                    throws IllegalArgumentException, IllegalStateException,
055:                    EJBException;
056:
057:            /**
058:             * Create an interval timer whose first expiration occurs after a specified
059:             * duration, and whose subsequent expirations occur after a specified
060:             * interval.
061:             * @param initialDuration The number of milliseconds that must elapse before
062:             *        the first timer expiration notification.
063:             * @param intervalDuration The number of milliseconds that must elapse
064:             *        between timer expiration notifications. Expiration notifications
065:             *        are scheduled relative to the time of the first expiration. If
066:             *        expiration is delayed(e.g. due to the interleaving of other method
067:             *        calls on the bean) two or more expiration notifications may occur
068:             *        in close succession to "catch up".
069:             * @param info Application information to be delivered along with the timer
070:             *        expiration. This can be null.
071:             * @return The newly created Timer.
072:             * @throws IllegalArgumentException If initialDuration is negative, or
073:             *         intervalDuration is negative.
074:             * @throws IllegalStateException If this method is invoked while the
075:             *         instance is in a state that does not allow access to this method.
076:             * @throws EJBException If this method could not complete due to a
077:             *         system-level failure.
078:             */
079:            Timer createTimer(final long initialDuration,
080:                    final long intervalDuration, final Serializable info)
081:                    throws IllegalArgumentException, IllegalStateException,
082:                    EJBException;
083:
084:            /**
085:             * Create a single-action timer that expires at a given point in time.
086:             * @param expiration The point in time at which the timer must expire.
087:             * @param info Application information to be delivered along with the timer
088:             *        expiration notification. This can be null.
089:             * @return The newly created Timer.
090:             * @throws IllegalArgumentException If expiration is null, or
091:             *         expiration.getTime() is negative.
092:             * @throws IllegalStateException If this method is invoked while the
093:             *         instance is in a state that does not allow access to this method.
094:             * @throws EJBException If this method could not complete due to a
095:             *         system-level failure.
096:             */
097:            Timer createTimer(final Date expiration, final Serializable info)
098:                    throws IllegalArgumentException, IllegalStateException,
099:                    EJBException;
100:
101:            /**
102:             * Create an interval timer whose first expiration occurs at a given point
103:             * in time and whose subsequent expirations occur after a specified
104:             * interval.
105:             * @param initialExpiration The point in time at which the first timer
106:             *        expiration must occur.
107:             * @param intervalDuration The number of milliseconds that must elapse
108:             *        between timer expiration notifications. Expiration notifications
109:             *        are scheduled relative to the time of the first expiration. If
110:             *        expiration is delayed(e.g. due to the interleaving of other method
111:             *        calls on the bean) two or more expiration notifications may occur
112:             *        in close succession to "catch up".
113:             * @param info Application information to be delivered along with the timer
114:             *        expiration. This can be null.
115:             * @return The newly created Timer.
116:             * @throws IllegalArgumentException If initialExpiration is null, or
117:             *         initialExpiration.getTime() is negative, or intervalDuration is
118:             *         negative.
119:             * @throws IllegalStateException If this method is invoked while the
120:             *         instance is in a state that does not allow access to this method.
121:             * @throws EJBException If this method could not complete due to a
122:             *         system-level failure.
123:             */
124:            Timer createTimer(Date initialExpiration, long intervalDuration,
125:                    Serializable info) throws IllegalArgumentException,
126:                    IllegalStateException, EJBException;
127:
128:            /**
129:             * Get all the active timers associated with this bean.
130:             * @return A collection of javax.ejb.Timer objects.
131:             * @throws IllegalStateException If this method is invoked while the
132:             *         instance is in a state that does not allow access to this method.
133:             * @throws EJBException If this method could not complete due to a
134:             *         system-level failure.
135:             */
136:            Collection getTimers() throws IllegalStateException, EJBException;
137:
138:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.