Java Doc for CrontabEntry.java in  » J2EE » Expresso » com » jcorporate » expresso » services » crontab » 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 » J2EE » Expresso » com.jcorporate.expresso.services.crontab 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.jcorporate.expresso.services.crontab.CrontabEntry

CrontabEntry
public class CrontabEntry implements Comparable,java.io.Serializable(Code)
CrontabEntry represents a repeatable 'action' that can take place at a given date and time.

A crontab entry's sort order creates differences between Comparable and equals(). the objects are compared by the execution time. They are tested for equality by testing time AND the listeners


author:
   Mike Dubman


Field Summary
final public static  intTIME_UNUSED
     Constant that represents a 'time' value that is unused.
protected  longalarmTime
    
protected static  ObjectcounterLock
    
protected  longcounterValue
     Unique id for sorting.
protected  intdayOfMonth
    
protected  intdayOfWeek
    
protected static  longglobalCounter
    
protected  inthour
    
protected  booleanisRelative
    
protected  booleanisRepetitive
    
protected  StringjobNumber
    
protected  Stringlabel
    
protected transient  CrontabListenerIlistener
    
protected  intminute
    
protected  intmonth
    
protected  intyear
    

Constructor Summary
public  CrontabEntry(Date date, CrontabListenerI listener)
     Constructs a Crontab Entry class.
public  CrontabEntry(int delay, boolean isRepetitive, CrontabListenerI listener)
    
public  CrontabEntry(int minute, int hour, int dayOfMonth, int month, int dayOfWeek, int year, CrontabListenerI listener)
     Construct a Crontab entry.
public  CrontabEntry(int minute, int hour, int dayOfMonth, int month, int dayOfWeek, int year, String jobLabel, CrontabListenerI listener)
     Construct a Crontab entry.

Method Summary
protected synchronized  voidadjustExecutionTime(Calendar now, Calendar alarm)
     Adjusts the execution time so that the next execution time is proper ie..
 voidcheckEntryTime()
     Checks the entry time.
public synchronized  intcompareTo(Object obj)
     Standard comparison operator.
public synchronized  booleanequals(Object obj)
     Returns true if the two alarm times of the comparing crontab entries are equal.
Parameters:
  obj - The CrontabEntry to compare against.
public  longgetAlarmTime()
     Get the alarm time in system time.
public  longgetCounter()
    
public  intgetDayOfMonth()
    
public  intgetDayOfWeek()
    
public  intgetHour()
    
public  StringgetJobNumber()
    
public  StringgetLabel()
    
public  CrontabListenerIgetListener()
     Retrieve the listener for the crontab.
public  intgetMinute()
    
public  intgetMonth()
    
public  intgetYear()
    
public  booleanisIsRelative()
    
public  booleanisIsRepetitive()
    
protected  voidsetCounterValue()
    
public  voidsetJobNumber(String s)
    
public synchronized  StringtoString()
     Returns the class as a string.
public synchronized  voidupdateEntryTime()
     Set the new/latest time.

Field Detail
TIME_UNUSED
final public static int TIME_UNUSED(Code)
Constant that represents a 'time' value that is unused.



alarmTime
protected long alarmTime(Code)
When is the next time for the alarm



counterLock
protected static Object counterLock(Code)



counterValue
protected long counterValue(Code)
Unique id for sorting.



dayOfMonth
protected int dayOfMonth(Code)
day of month for the crontab



dayOfWeek
protected int dayOfWeek(Code)
day of week for the crontab



globalCounter
protected static long globalCounter(Code)



hour
protected int hour(Code)
Hours for the crontab



isRelative
protected boolean isRelative(Code)
Is the crontab a 'relative' time?



isRepetitive
protected boolean isRepetitive(Code)
Is the crontab a repetitive job



jobNumber
protected String jobNumber(Code)
Job Number for this CrontabEntry's associated JobQueue entry



label
protected String label(Code)
Label for the crontab



listener
protected transient CrontabListenerI listener(Code)
The listener of the crontab



minute
protected int minute(Code)
The minutes for the crontab



month
protected int month(Code)
month for the crontab



year
protected int year(Code)
year for the crontab




Constructor Detail
CrontabEntry
public CrontabEntry(Date date, CrontabListenerI listener) throws CronException(Code)
Constructs a Crontab Entry class.
Parameters:
  date - The date to execute the crontab listener
Parameters:
  listener - The class to execute when the alarm 'rings'
throws:
  CronException - upon error



CrontabEntry
public CrontabEntry(int delay, boolean isRepetitive, CrontabListenerI listener)(Code)
Construct a new crontab entry with a given delay
Parameters:
  delay - the job until the number of minutes in the next hour
Parameters:
  isRepetitive - set if the job should be executed every X amount oftime
Parameters:
  listener - the interface to notify when the cron 'rings'
throws:
  IllegalArgumentException - if the delay is less than 1



CrontabEntry
public CrontabEntry(int minute, int hour, int dayOfMonth, int month, int dayOfWeek, int year, CrontabListenerI listener) throws CronException(Code)
Construct a Crontab entry.
Parameters:
  minute - Minute of the hour to execute
Parameters:
  hour - Hour of the day to execute
Parameters:
  dayOfMonth - The day of the month to execute
Parameters:
  month - The month of the year to execute
Parameters:
  dayOfWeek - The day of the week to execute
Parameters:
  year - to execute OR TIME_UNUSED if this is a repetative crontabentry
Parameters:
  listener - The class that gets called when the crontab 'rings'
throws:
  CronException - upon error



CrontabEntry
public CrontabEntry(int minute, int hour, int dayOfMonth, int month, int dayOfWeek, int year, String jobLabel, CrontabListenerI listener) throws CronException(Code)
Construct a Crontab entry.
Parameters:
  minute - Minute of the hour to execute
Parameters:
  hour - Hour of the day to execute
Parameters:
  dayOfMonth - The day of the month to execute
Parameters:
  month - The month of the year to execute
Parameters:
  dayOfWeek - The day of the week to execute
Parameters:
  year - to execute OR TIME_UNUSED if this is a repetative crontabentry
Parameters:
  jobLabel - - The label of the crontab entry.
Parameters:
  listener - The class that gets called when the crontab 'rings'
throws:
  CronException - upon error




Method Detail
adjustExecutionTime
protected synchronized void adjustExecutionTime(Calendar now, Calendar alarm)(Code)
Adjusts the execution time so that the next execution time is proper ie.. all cron rules should be followed and the next cron execution should be greater than now.
Parameters:
  now - 'now' calendar instance
Parameters:
  alarm - the next instance that the calendar should execute.



checkEntryTime
void checkEntryTime() throws CronException(Code)
Checks the entry time.
throws:
  CronException - if delay is less than 1 second.



compareTo
public synchronized int compareTo(Object obj)(Code)
Standard comparison operator. Checks against the alarm entry time.

compareTo and equals behave differently. compareTo only sorts by alarm time. Equals checks alarm times and listeners


Parameters:
  obj - The object to compare against. integer as per standard Object.compareTo values
See Also:   java.lang.Comparable.compareTo



equals
public synchronized boolean equals(Object obj)(Code)
Returns true if the two alarm times of the comparing crontab entries are equal.
Parameters:
  obj - The CrontabEntry to compare against. true if the two objects are equal



getAlarmTime
public long getAlarmTime()(Code)
Get the alarm time in system time. long integer.



getCounter
public long getCounter()(Code)
Retrieve an incrementing id value unique across crontab instances long value.



getDayOfMonth
public int getDayOfMonth()(Code)
Retrieve the day of month setting integer



getDayOfWeek
public int getDayOfWeek()(Code)
Return day of week setting integer



getHour
public int getHour()(Code)
Retrieve hour setting integer



getJobNumber
public String getJobNumber()(Code)
Return Job Number for this CrontabEntry's associated JobQueue entry Job Number for this CrontabEntry's associated JobQueue entry



getLabel
public String getLabel()(Code)
Retrieve the label of the entry java.lang.String



getListener
public CrontabListenerI getListener()(Code)
Retrieve the listener for the crontab.



getMinute
public int getMinute()(Code)
Retrieve the minutes of the entry integer



getMonth
public int getMonth()(Code)
Return the month value of the entry integer



getYear
public int getYear()(Code)
Return the year value of the entry integer



isIsRelative
public boolean isIsRelative()(Code)
Return isRelative value boolean



isIsRepetitive
public boolean isIsRepetitive()(Code)
Retrieve the isRepetitive value boolean



setCounterValue
protected void setCounterValue()(Code)
Sets the counter so that order is guaranteed



setJobNumber
public void setJobNumber(String s)(Code)
Set Job Number for this CrontabEntry's associated JobQueue entry
Parameters:
  s - Job Number for this CrontabEntry's associated JobQueue entry



toString
public synchronized String toString()(Code)
Returns the class as a string. Useful for debugging purposes a String representing this class.



updateEntryTime
public synchronized void updateEntryTime()(Code)
Set the new/latest time. For example, if it's a repeatable and the last alarm time is passed, then we calculate the next one.



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.