Java Doc for TimerServiceImpl.java in  » EJB-Server-JBoss-4.2.1 » server » org » jboss » ejb » txtimer » 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 » EJB Server JBoss 4.2.1 » server » org.jboss.ejb.txtimer 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jboss.ejb.txtimer.TimerServiceImpl

TimerServiceImpl
public class TimerServiceImpl implements TimerService(Code)
The TimerService provides enterprise bean components with access to the container-provided Timer Service. The EJB Timer Service allows entity beans, stateless session beans, and message-driven beans to be registered for timer callback events at a specified time, after a specified elapsed time, or after a specified interval.
author:
   Thomas.Diesler@jboss.org
author:
   Dimitris.Andreadis@jboss.org
version:
   $Revision: 57209 $
since:
   07-Apr-2004



Constructor Summary
public  TimerServiceImpl(TimedObjectId timedObjectId, TimedObjectInvoker timedObjectInvoker, TransactionManager transactionManager, PersistencePolicy persistencePolicy, RetryPolicy retryPolicy, TimerIdGenerator timerIdGenerator)
    

Method Summary
 voidaddTimer(TimerImpl txtimer)
    
public  TimercreateTimer(long duration, Serializable info)
     Create a single-action txtimer that expires after a specified duration.
Parameters:
  duration - The number of milliseconds that must elapse before the txtimer expires.
Parameters:
  info - Application information to be delivered along with the txtimer expirationnotification.
public  TimercreateTimer(long initialDuration, long intervalDuration, Serializable info)
     Create an interval txtimer whose first expiration occurs after a specified duration, and whose subsequent expirations occur after a specified interval.
Parameters:
  initialDuration - The number of milliseconds that must elapse before the firsttxtimer expiration notification.
Parameters:
  intervalDuration - The number of milliseconds that must elapse between txtimerexpiration notifications.
public  TimercreateTimer(Date expiration, Serializable info)
     Create a single-action txtimer that expires at a given point in time.
Parameters:
  expiration - The point in time at which the txtimer must expire.
Parameters:
  info - Application information to be delivered along with the txtimer expirationnotification.
public  TimercreateTimer(Date initialExpiration, long intervalDuration, Serializable info)
     Create an interval txtimer whose first expiration occurs at a given point in time and whose subsequent expirations occur after a specified interval.
Parameters:
  initialExpiration - The point in time at which the first txtimer expiration must occur.
Parameters:
  intervalDuration - The number of milliseconds that must elapse between txtimerexpiration notifications.
public  CollectiongetAllTimers()
    
public  TimedObjectInvokergetTimedObjectInvoker()
    
public  TimergetTimer(TimerHandle handle)
    
public  CollectiongetTimers()
     Get all the active timers associated with this bean.
 TransactiongetTransaction()
    
 voidremoveTimer(TimerImpl txtimer)
    
 voidretryTimeout(TimerImpl txtimer)
    
public  voidshutdown(boolean keepState)
    


Constructor Detail
TimerServiceImpl
public TimerServiceImpl(TimedObjectId timedObjectId, TimedObjectInvoker timedObjectInvoker, TransactionManager transactionManager, PersistencePolicy persistencePolicy, RetryPolicy retryPolicy, TimerIdGenerator timerIdGenerator)(Code)
CTOR All the dependencies are supplied by the caller




Method Detail
addTimer
void addTimer(TimerImpl txtimer)(Code)
Add a txtimer to the list of active timers



createTimer
public Timer createTimer(long duration, Serializable info) throws IllegalArgumentException, IllegalStateException, EJBException(Code)
Create a single-action txtimer that expires after a specified duration.
Parameters:
  duration - The number of milliseconds that must elapse before the txtimer expires.
Parameters:
  info - Application information to be delivered along with the txtimer expirationnotification. This can be null. The newly created Timer.
throws:
  IllegalArgumentException - If duration is negative
throws:
  IllegalStateException - If this method is invoked while the instance is ina state that does not allow access to this method.
throws:
  javax.ejb.EJBException - If this method could not complete due to a system-level failure.



createTimer
public Timer createTimer(long initialDuration, long intervalDuration, Serializable info) throws IllegalArgumentException, IllegalStateException, EJBException(Code)
Create an interval txtimer whose first expiration occurs after a specified duration, and whose subsequent expirations occur after a specified interval.
Parameters:
  initialDuration - The number of milliseconds that must elapse before the firsttxtimer expiration notification.
Parameters:
  intervalDuration - The number of milliseconds that must elapse between txtimerexpiration notifications. Expiration notifications arescheduled relative to the time of the first expiration. Ifexpiration is delayed(e.g. due to the interleaving of othermethod calls on the bean) two or more expiration notificationsmay occur in close succession to "catch up".
Parameters:
  info - Application information to be delivered along with the txtimer expirationnotification. This can be null. The newly created Timer.
throws:
  IllegalArgumentException - If initialDuration is negative, or intervalDurationis negative.
throws:
  IllegalStateException - If this method is invoked while the instance is ina state that does not allow access to this method.
throws:
  javax.ejb.EJBException - If this method could not complete due to a system-level failure.



createTimer
public Timer createTimer(Date expiration, Serializable info) throws IllegalArgumentException, IllegalStateException, EJBException(Code)
Create a single-action txtimer that expires at a given point in time.
Parameters:
  expiration - The point in time at which the txtimer must expire.
Parameters:
  info - Application information to be delivered along with the txtimer expirationnotification. This can be null. The newly created Timer.
throws:
  IllegalArgumentException - If expiration is null, or expiration.getTime() is negative.
throws:
  IllegalStateException - If this method is invoked while the instance is ina state that does not allow access to this method.
throws:
  javax.ejb.EJBException - If this method could not complete due to a system-level failure.



createTimer
public Timer createTimer(Date initialExpiration, long intervalDuration, Serializable info) throws IllegalArgumentException, IllegalStateException, EJBException(Code)
Create an interval txtimer whose first expiration occurs at a given point in time and whose subsequent expirations occur after a specified interval.
Parameters:
  initialExpiration - The point in time at which the first txtimer expiration must occur.
Parameters:
  intervalDuration - The number of milliseconds that must elapse between txtimerexpiration notifications. Expiration notifications arescheduled relative to the time of the first expiration. Ifexpiration is delayed(e.g. due to the interleaving of othermethod calls on the bean) two or more expiration notificationsmay occur in close succession to "catch up".
Parameters:
  info - Application information to be delivered along with the txtimer expirationnotification. This can be null. The newly created Timer.
throws:
  IllegalArgumentException - If initialExpiration is null, or initialExpiration.getTime()is negative, or intervalDuration is negative.
throws:
  IllegalStateException - If this method is invoked while the instance is ina state that does not allow access to this method.
throws:
  javax.ejb.EJBException - If this method could not complete due to a system-level failure.



getAllTimers
public Collection getAllTimers()(Code)
Get the list of all registerd timers, both active and inactive



getTimedObjectInvoker
public TimedObjectInvoker getTimedObjectInvoker()(Code)
Get the TimedObjectInvoker associated with this TimerService



getTimer
public Timer getTimer(TimerHandle handle)(Code)
Get the Timer for the given timedObjectId



getTimers
public Collection getTimers() throws IllegalStateException, EJBException(Code)
Get all the active timers associated with this bean. A collection of javax.ejb.Timer objects.
throws:
  IllegalStateException - If this method is invoked while the instance is ina state that does not allow access to this method.
throws:
  javax.ejb.EJBException - If this method could not complete due to a system-level failure.



getTransaction
Transaction getTransaction()(Code)
Get the current transaction



removeTimer
void removeTimer(TimerImpl txtimer)(Code)
Remove a txtimer from the list of active timers



retryTimeout
void retryTimeout(TimerImpl txtimer)(Code)



shutdown
public void shutdown(boolean keepState)(Code)
Kill all timers
Parameters:
  keepState - Whether to maintain or remove timer persistent state



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.