Java Doc for PTimerSpec.java in  » 6.0-JDK-Modules » j2me » com » sun » util » 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 » 6.0 JDK Modules » j2me » com.sun.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.util.PTimerSpec

PTimerSpec
public class PTimerSpec (Code)

A class representing a timer specification. A timer specification declares when a PTimerWentOffEvent should be sent. These events are sent to the listeners registered on the specification.

  • Absolute If the PTimerSpec is Absolute, then events will be dispatched at a specified time. Otherwise the time value is relative to the time at which the event is scheduled.
  • Repeat If the PTimerSpec is repeating, events will be dispatched at intervals specified by the timevalue. It is meaningless to specify an Absolute event to repeat.
  • Regular If a PTimerSpec is Regular, the PTimer will attempt to notify its listener at the specified interval regardless of how much time the event processing takes. Otherwise, the specified time is the amount of time after all listeners have been called.

    Compatibility

    The PTimer and PTimerSpec classes are part of the Personal Java Specification and are not part of J2SE. They are deprecated in the Personal Profile as they have been replaced by the java.util.timer class.
    since:
       : PersonalJava1.0


  • Field Summary
    protected  Objectlisteners
        

    Constructor Summary
    public  PTimerSpec()
        

    Method Summary
    public  voidaddPTimerWentOffListener(PTimerWentOffListener l)
         Adds a listener to this timer specification.
    public  longgetTime()
         Returns the absolute or delay time when this specification will go off.
    public  booleanisAbsolute()
         Checks if this specification is absolute.
    public  booleanisRegular()
         Retrieves the "Regular" property of the PTimerSpec.
    public  booleanisRepeat()
        
    public  voidnotifyListeners(PTimer source)
         Calls all listeners registered on this timer specification.
    public  voidremovePTimerWentOffListener(PTimerWentOffListener l)
         Removes a listener to this timer specification.
    public  voidsetAbsolute(boolean absolute)
         Specifies that the timer should send an event at an absolute time

    When a timer event is set to be absolute, the time value is specified in milliseconds since since midnight, January 1, 1970.

    public  voidsetAbsoluteTime(long when)
         Sets the PTimerSpec for an absolute, non-repeating time specified by when.
    public  voidsetDelayTime(long delay)
         Sets the PTimerSpec for non-repeating, relative time specified by delay.
    public  voidsetRegular(boolean regular)
        
    public  voidsetRepeat(boolean repeat)
         Sets the repeat property of this PTimerSpec.
    public  voidsetTime(long time)
         Sets when this specification should go off.

    Field Detail
    listeners
    protected Object listeners(Code)




    Constructor Detail
    PTimerSpec
    public PTimerSpec()(Code)
    Creates timer with the following properties:
  • absolute = true
  • repeat = false
  • regular = true
  • interval = 0




  • Method Detail
    addPTimerWentOffListener
    public void addPTimerWentOffListener(PTimerWentOffListener l)(Code)
    Adds a listener to this timer specification.
    Parameters:
      l - the listener to add



    getTime
    public long getTime()(Code)
    Returns the absolute or delay time when this specification will go off.



    isAbsolute
    public boolean isAbsolute()(Code)
    Checks if this specification is absolute. the "Absolute" status of the PTimerSpec



    isRegular
    public boolean isRegular()(Code)
    Retrieves the "Regular" property of the PTimerSpec.



    isRepeat
    public boolean isRepeat()(Code)
    Checks if this specification is repeating the "Repeat" status of the PTimerSpec



    notifyListeners
    public void notifyListeners(PTimer source)(Code)
    Calls all listeners registered on this timer specification. This function is primarily for the benefit of those writing implementations of PTimers.
    Parameters:
      source - the PTimer that decided that this specification should go off



    removePTimerWentOffListener
    public void removePTimerWentOffListener(PTimerWentOffListener l)(Code)
    Removes a listener to this timer specification. Silently does nothing if the listener was not listening on this specification.
    Parameters:
      l - the listener to remove



    setAbsolute
    public void setAbsolute(boolean absolute)(Code)
    Specifies that the timer should send an event at an absolute time

    When a timer event is set to be absolute, the time value is specified in milliseconds since since midnight, January 1, 1970. Otherwise, the delay time is scheduled relative to the current time.




    setAbsoluteTime
    public void setAbsoluteTime(long when)(Code)
    Sets the PTimerSpec for an absolute, non-repeating time specified by when. This is a convenience function equivalent to setAbsolute(true), setTime(when), setRepeat(false).
    Parameters:
      when - the absolute time for the specification to go off



    setDelayTime
    public void setDelayTime(long delay)(Code)
    Sets the PTimerSpec for non-repeating, relative time specified by delay. This is a convenience function equivalent to setAbsolute(false), setTime(delay), setRepeat(false).
    Parameters:
      delay - the relative time for the specification to go off



    setRegular
    public void setRegular(boolean regular)(Code)
    Sets this specification to be regular or non-regular



    setRepeat
    public void setRepeat(boolean repeat)(Code)
    Sets the repeat property of this PTimerSpec.



    setTime
    public void setTime(long time)(Code)
    Sets when this specification should go off. For absolute specifications, this is a time in milliseconds since midnight, January 1, 1970 UTC. For delayed specifications, this is a delay time in milliseconds.



    Methods inherited from java.lang.Object
    public boolean equals(Object obj)(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.