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


javax.management.timer.TimerMBean

All known Subclasses:   javax.management.timer.Timer,
TimerMBean
public interface TimerMBean (Code)
The timer service MBean interface.


author:
   Adrian Brock
version:
   $Revision: 57200 $





Method Summary
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  IntegeraddNotification(String type, String message, Object userData, Date date, long period, long occurences)
     Creates a new timer notification for a specific date/time, with an optional repeat period and a maximum number of occurences.

If the date and time is before the the current date and time the period is repeatedly added until a date after the current date and time is found.

public  IntegeraddNotification(String type, String message, Object userData, Date date, long period)
     Creates a new timer notification for a specific date/time, with an optional repeat period. When the repeat period is not zero, the notification repeats forever.

If the date and time is before the the current date and time the period is repeatedly added until a date after the current date and time is found.
Parameters:
  type - the notification type.
Parameters:
  message - the notification's message string.
Parameters:
  userData - the notification's user data.
Parameters:
  date - the date/time the notification will occur.
Parameters:
  period - the repeat period in milli-seconds.

public  IntegeraddNotification(String type, String message, Object userData, Date date)
     Creates a new timer notification for a specific date/time. The notification is performed once.
Parameters:
  type - the notification type.
Parameters:
  message - the notification's message string.
Parameters:
  userData - the notification's user data.
Parameters:
  date - the date/time the notification will occur.
public  VectorgetAllNotificationIDs()
     Retrieves all timer notifications ids. a vector of Integers containing the ids.
public  DategetDate(Integer id)
     Retrieves a copy of the notification date for a passed notification id.
Parameters:
  id - the notification 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()
     Retrieves the number of registered timer notifications.
public  LonggetNbOccurences(Integer id)
     Retrieves a copy of the maximum notification occurences for a passed notification id.
Parameters:
  id - the notification id.
public  VectorgetNotificationIDs(String type)
     Retrieves all timer notifications ids of the passed notification type.
Parameters:
  type - the notification type.
public  StringgetNotificationMessage(Integer id)
     Retrieves the notification message for a passed notification id.
Parameters:
  id - the notification id.
public  StringgetNotificationType(Integer id)
     Retrieves the notification type for a passed notification id.
Parameters:
  id - the notification id.
public  ObjectgetNotificationUserData(Integer id)
     Retrieves the notification user data for a passed notification id.
Parameters:
  id - the notification id.
public  LonggetPeriod(Integer id)
     Retrieves a copy of the notification period for a passed notification id.
Parameters:
  id - the notification id.
public  booleangetSendPastNotifications()
     Retrieves the flag indicating whether past notifications are sent.
public  booleanisActive()
     Test whether the timer MBean is active.
public  booleanisEmpty()
     Test whether the timer MBean has any registered notifications.
public  voidremoveAllNotifications()
     Removes all notifications from the timer MBean.
public  voidremoveNotification(Integer id)
     Removes a notification from the timer MBean with the specified notification id.
public  voidremoveNotifications(String type)
     Removes all notifications from the timer MBean of the specified notification type.
public  voidsetSendPastNotifications(boolean value)
     Sets the flag indicating whether past notifications are sent.
Parameters:
  value - the new value of the flag.
public  voidstart()
     Starts the timer.
public  voidstop()
     Stops the timer.



Method Detail
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




addNotification
public Integer addNotification(String type, String message, Object userData, Date date, long period, long occurences) throws IllegalArgumentException(Code)
Creates a new timer notification for a specific date/time, with an optional repeat period and a maximum number of occurences.

If the date and time is before the the current date and time the period is repeatedly added until a date after the current date and time is found. If the number of occurences is exceeded before the current date and time is reached, an IllegalArgumentException is raised.
Parameters:
  type - the notification type.
Parameters:
  message - the notification's message string.
Parameters:
  userData - the notification's user data.
Parameters:
  date - the date/time the notification will occur.
Parameters:
  period - the repeat period in milli-seconds. Passing zero meansno repeat.
Parameters:
  occurences - the maximum number of repeats. When the period is notzero and this parameter is zero, it will repeat indefinitely. the notification id for this notification.
throws:
  IllegalArgumentException - when the date is before the currentdate, the period is negative or the number of repeats isnegative.




addNotification
public Integer addNotification(String type, String message, Object userData, Date date, long period) throws IllegalArgumentException(Code)
Creates a new timer notification for a specific date/time, with an optional repeat period. When the repeat period is not zero, the notification repeats forever.

If the date and time is before the the current date and time the period is repeatedly added until a date after the current date and time is found.
Parameters:
  type - the notification type.
Parameters:
  message - the notification's message string.
Parameters:
  userData - the notification's user data.
Parameters:
  date - the date/time the notification will occur.
Parameters:
  period - the repeat period in milli-seconds. Passing zero meansno repeat. the notification id for this notification.
throws:
  IllegalArgumentException - when the date is before the currentdate or the period is negative.




addNotification
public Integer addNotification(String type, String message, Object userData, Date date) throws IllegalArgumentException(Code)
Creates a new timer notification for a specific date/time. The notification is performed once.
Parameters:
  type - the notification type.
Parameters:
  message - the notification's message string.
Parameters:
  userData - the notification's user data.
Parameters:
  date - the date/time the notification will occur. the notification id for this notification.
throws:
  IllegalArgumentException - when the date is before the currentdate.



getAllNotificationIDs
public Vector getAllNotificationIDs()(Code)
Retrieves all timer notifications ids. a vector of Integers containing the ids. The list is emptywhen there are no timer notifications.



getDate
public Date getDate(Integer id)(Code)
Retrieves a copy of the notification date for a passed notification id.
Parameters:
  id - the notification id. a copy of the notification date or null when the notification idis not registered.



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)
Retrieves the number of registered timer notifications. the number of notifications.



getNbOccurences
public Long getNbOccurences(Integer id)(Code)
Retrieves a copy of the maximum notification occurences for a passed notification id.
Parameters:
  id - the notification id. a copy of the maximum notification occurences or null when thenotification id is not registered.



getNotificationIDs
public Vector getNotificationIDs(String type)(Code)
Retrieves all timer notifications ids of the passed notification type.
Parameters:
  type - the notification type. a vector of Integers containing the ids. The list is emptywhen there are no timer notifications of the passed type.



getNotificationMessage
public String getNotificationMessage(Integer id)(Code)
Retrieves the notification message for a passed notification id.
Parameters:
  id - the notification id. the notification message or null when the notification id isnot registered.



getNotificationType
public String getNotificationType(Integer id)(Code)
Retrieves the notification type for a passed notification id.
Parameters:
  id - the notification id. the notification type or null when the notification id isnot registered.



getNotificationUserData
public Object getNotificationUserData(Integer id)(Code)
Retrieves the notification user data for a passed notification id.
Parameters:
  id - the notification id. the notification user data or null when the notification id isnot registered.



getPeriod
public Long getPeriod(Integer id)(Code)
Retrieves a copy of the notification period for a passed notification id.
Parameters:
  id - the notification id. a copy of the notification period or null when the notificationid is not registered.



getSendPastNotifications
public boolean getSendPastNotifications()(Code)
Retrieves the flag indicating whether past notifications are sent. true when past notifications are sent, false otherwise.



isActive
public boolean isActive()(Code)
Test whether the timer MBean is active. true when timer is active, false otherwise.



isEmpty
public boolean isEmpty()(Code)
Test whether the timer MBean has any registered notifications. true when timer has no registered notifications, false otherwise.



removeAllNotifications
public void removeAllNotifications()(Code)
Removes all notifications from the timer MBean.



removeNotification
public void removeNotification(Integer id) throws InstanceNotFoundException(Code)
Removes a notification from the timer MBean with the specified notification id.
Parameters:
  id - the notification id.
throws:
  InstanceNotFoundException - when there are no notificationregistered with the id passed.



removeNotifications
public void removeNotifications(String type) throws InstanceNotFoundException(Code)
Removes all notifications from the timer MBean of the specified notification type.
Parameters:
  type - the notification type.
throws:
  InstanceNotFoundException - when there are no notifications ofthe type passed.



setSendPastNotifications
public void setSendPastNotifications(boolean value)(Code)
Sets the flag indicating whether past notifications are sent.
Parameters:
  value - the new value of the flag. true when past notificationsare sent, false otherwise.



start
public void start()(Code)
Starts the timer. If there are any notifications before the current time these notifications are processed. The notification only takes place when send past notiications is true.



stop
public void stop()(Code)
Stops the timer.



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