Java Doc for JBossTimer.java in  » EJB-Server-JBoss-4.2.1 » jmx » org » jboss » mx » timer » 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 » jmx » org.jboss.mx.timer 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.management.NotificationBroadcasterSupport
      org.jboss.mx.timer.JBossTimer

JBossTimer
public class JBossTimer extends NotificationBroadcasterSupport implements JBossTimerMBean,MBeanRegistration(Code)
A clone of the JBossMX javax.management.timer.Timer service. There are indications that the jdk5 javax.management.timer.Timer uses internally a single-threaded implementation for executing scheduled tasks, so scheduling of multiple tasks is affected when moving from jdk1.4 and the jboss implementation of Timer, to a jdk5 runtime. The JBossMX Timer implementation in contrast uses a dynamically extensible thread pool to execute scheduled tasks. Since we don't control the jdk5 implementation, we've cloned the jboss timer so it can be used as a drop-in replacement of the jdk JMX Timer. The two classes *should* be kept in sync, or instead change our javax.management.timer.Timer to delegate to this class.
See Also:   javax.management.timer.Timer
author:
   Adrian Brock
author:
   Dimitris Andreadis
version:
   $Revision: 57200 $


Field Summary
final public static  longONE_DAY
     The number of milliseconds in one day.
final public static  longONE_HOUR
     The number of milliseconds in one hour.
final public static  longONE_MINUTE
     The number of milliseconds in one minute.
final public static  longONE_SECOND
     The number of milliseconds in one second.
final public static  longONE_WEEK
     The number of milliseconds in one week.
 booleanactive
     Whether the service is active.
 intnextId
     The next notification id.
 HashMapnotifications
     The registered notifications.
 ObjectNameobjectName
     Our object name.
 booleansendPastNotifications
     The send past events attribute.
 longsequenceNumber
     The next notification sequence number.


Method Summary
public  IntegeraddNotification(String type, String message, Object userData, Date date)
    
public  IntegeraddNotification(String type, String message, Object userData, Date date, long period)
    
public  IntegeraddNotification(String type, String message, Object userData, Date date, long period, long occurences)
    
public  IntegeraddNotification(String type, String message, Object userData, Date date, long period, long nbOccurences, boolean fixedRate)
     Creates a new timer notification with the specified type, message and userData and inserts it into the list of notifications with a given date, period and number of occurences.

If the timer notification to be inserted has a date that is before the current date, the method behaves as if the specified date were the current date. For once-off notifications, the notification is delivered immediately. For periodic notifications, the first notification is delivered immediately and the subsequent ones are spaced as specified by the period parameter.

Note that once the timer notification has been added into the list of notifications, its associated date, period and number of occurences cannot be updated.

In the case of a periodic notification, the value of parameter fixedRate is used to specify the execution scheme, as specified in Timer.
Parameters:
  type - The timer notification type.
Parameters:
  message - The timer notification detailed message.
Parameters:
  userData - The timer notification user data object.
Parameters:
  date - The date when the notification occurs.
Parameters:
  period - The period of the timer notification (in milliseconds).
Parameters:
  nbOccurences - The total number the timer notification will be emitted.
Parameters:
  fixedRate - If true and if the notification is periodic, the notification is scheduled with a fixed-rate execution scheme.

public  VectorgetAllNotificationIDs()
    
public  DategetDate(Integer id)
    
public  BooleangetFixedRate(Integer id)
     Gets a copy of the flag indicating whether a peridic notification is executed at fixed-delay or at fixed-rate.
Parameters:
  id - The timer notification identifier.
public  intgetNbNotifications()
    
public  LonggetNbOccurences(Integer id)
    
public  VectorgetNotificationIDs(String type)
    
public  StringgetNotificationMessage(Integer id)
    
public  StringgetNotificationType(Integer id)
    
public  ObjectgetNotificationUserData(Integer id)
    
public  LonggetPeriod(Integer id)
    
public  booleangetSendPastNotifications()
    
public  booleanisActive()
    
public  booleanisEmpty()
    
public  voidpostDeregister()
    
public  voidpostRegister(Boolean registrationDone)
    
public  voidpreDeregister()
    
public  ObjectNamepreRegister(MBeanServer server, ObjectName objectName)
    
public  voidremoveAllNotifications()
    
public  voidremoveNotification(Integer id)
    
public  voidremoveNotifications(String type)
    
public  voidsetSendPastNotifications(boolean value)
    
public synchronized  voidstart()
    
public synchronized  voidstop()
    

Field Detail
ONE_DAY
final public static long ONE_DAY(Code)
The number of milliseconds in one day.



ONE_HOUR
final public static long ONE_HOUR(Code)
The number of milliseconds in one hour.



ONE_MINUTE
final public static long ONE_MINUTE(Code)
The number of milliseconds in one minute.



ONE_SECOND
final public static long ONE_SECOND(Code)
The number of milliseconds in one second.



ONE_WEEK
final public static long ONE_WEEK(Code)
The number of milliseconds in one week.



active
boolean active(Code)
Whether the service is active.



nextId
int nextId(Code)
The next notification id.



notifications
HashMap notifications(Code)
The registered notifications.



objectName
ObjectName objectName(Code)
Our object name.



sendPastNotifications
boolean sendPastNotifications(Code)
The send past events attribute.



sequenceNumber
long sequenceNumber(Code)
The next notification sequence number.





Method Detail
addNotification
public Integer addNotification(String type, String message, Object userData, Date date) throws IllegalArgumentException(Code)



addNotification
public Integer addNotification(String type, String message, Object userData, Date date, long period) throws IllegalArgumentException(Code)



addNotification
public Integer addNotification(String type, String message, Object userData, Date date, long period, long occurences) throws IllegalArgumentException(Code)



addNotification
public Integer addNotification(String type, String message, Object userData, Date date, long period, long nbOccurences, boolean fixedRate) throws IllegalArgumentException(Code)
Creates a new timer notification with the specified type, message and userData and inserts it into the list of notifications with a given date, period and number of occurences.

If the timer notification to be inserted has a date that is before the current date, the method behaves as if the specified date were the current date. For once-off notifications, the notification is delivered immediately. For periodic notifications, the first notification is delivered immediately and the subsequent ones are spaced as specified by the period parameter.

Note that once the timer notification has been added into the list of notifications, its associated date, period and number of occurences cannot be updated.

In the case of a periodic notification, the value of parameter fixedRate is used to specify the execution scheme, as specified in Timer.
Parameters:
  type - The timer notification type.
Parameters:
  message - The timer notification detailed message.
Parameters:
  userData - The timer notification user data object.
Parameters:
  date - The date when the notification occurs.
Parameters:
  period - The period of the timer notification (in milliseconds).
Parameters:
  nbOccurences - The total number the timer notification will be emitted.
Parameters:
  fixedRate - If true and if the notification is periodic, the notification is scheduled with a fixed-rate execution scheme. If false and if the notification is periodic, the notification is scheduled with a fixed-delay execution scheme. Ignored if the notification is not periodic. The identifier of the new created timer notification.
throws:
  IllegalArgumentException - The period or the number of occurences is negative




getAllNotificationIDs
public Vector getAllNotificationIDs()(Code)



getDate
public Date getDate(Integer id)(Code)



getFixedRate
public Boolean getFixedRate(Integer id)(Code)
Gets a copy of the flag indicating whether a peridic notification is executed at fixed-delay or at fixed-rate.
Parameters:
  id - The timer notification identifier. A copy of the flag indicating whether a peridic notification is executed at fixed-delay or at fixed-rate.



getNbNotifications
public int getNbNotifications()(Code)



getNbOccurences
public Long getNbOccurences(Integer id)(Code)



getNotificationIDs
public Vector getNotificationIDs(String type)(Code)



getNotificationMessage
public String getNotificationMessage(Integer id)(Code)



getNotificationType
public String getNotificationType(Integer id)(Code)



getNotificationUserData
public Object getNotificationUserData(Integer id)(Code)



getPeriod
public Long getPeriod(Integer id)(Code)



getSendPastNotifications
public boolean getSendPastNotifications()(Code)



isActive
public boolean isActive()(Code)



isEmpty
public boolean isEmpty()(Code)



postDeregister
public void postDeregister()(Code)



postRegister
public void postRegister(Boolean registrationDone)(Code)



preDeregister
public void preDeregister() throws Exception(Code)



preRegister
public ObjectName preRegister(MBeanServer server, ObjectName objectName) throws Exception(Code)



removeAllNotifications
public void removeAllNotifications()(Code)



removeNotification
public void removeNotification(Integer id) throws InstanceNotFoundException(Code)



removeNotifications
public void removeNotifications(String type) throws InstanceNotFoundException(Code)



setSendPastNotifications
public void setSendPastNotifications(boolean value)(Code)



start
public synchronized void start()(Code)



stop
public synchronized void stop()(Code)



Methods inherited from javax.management.NotificationBroadcasterSupport
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)(Code)(Java Doc)
public MBeanNotificationInfo[] getNotificationInfo()(Code)(Java Doc)
protected void handleNotification(NotificationListener listener, Notification notification, Object handback)(Code)(Java Doc)
public void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException(Code)(Java Doc)
public void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException(Code)(Java Doc)
public void sendNotification(Notification notification)(Code)(Java Doc)

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.