Java Doc for DemoControlService.java in  » Science » Cougaar12_4 » org » cougaar » core » service » 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 » Science » Cougaar12_4 » org.cougaar.core.service 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.cougaar.core.service.DemoControlService

DemoControlService
public interface DemoControlService extends Service(Code)
This service controls the execution time in AlarmService.currentTimeMillis and AlarmService.addAlarm .

Although the standard implementation for "setSocietyTime" uses a node-level org.cougaar.core.node.service.NaturalTimeService and "list all nodes" naming service targets list, some effort has been made to allow separate execution times both between nodes and in the agents within nodes.


Inner Class :public interface Callback



Method Summary
 voidadvanceNodeTime(long period, double rate)
    
 voidadvanceSocietyTime(long period)
    
 voidadvanceSocietyTime(long period, boolean forceRunning)
    
 voidadvanceSocietyTime(long period, double rate)
    
 voidadvanceSocietyTime(ExecutionTimer.Change[] changes)
    
 doublegetExecutionRate()
     Get the local node's execution rate.
 voidsetLocalTime(long offset, double rate, long changeTime)
     Schedule a thread to set the local agent's time at real-time changeTime to an execution-time of changeTime + offset and rate.
 voidsetNodeTime(long time, double rate, long changeTime)
     Backwards-compatible variations of DemoControlService.setLocalTime(long,double,long) .
 voidsetNodeTime(long time, double rate)
    
 booleansetSocietyTime(long offset, double rate, long changeTime, Set targets, Callback cb)
     Non-blocking method to set the node time at the specified nodes.
Parameters:
  offset - offset of real-time at the changeTime
Parameters:
  rate - time rate multiplier (e.g.
 booleansetSocietyTime(long offset, double rate, long changeTime, Callback cb)
     Mostly non-blocking setSocietyTime to all nodes listed in the naming service, but the naming service lookup could block or return a partial list.
 booleansetSocietyTime(long offset, double rate, long changeTime, Set targets, long timeout)
     Blocking setSocietyTime variations with timeouts.

These are identical to the above Callback variations with a simple Callback that blocks on an "Object.wait(timeout)".

Callers should pass a timeout that's <= to the changeTime, since usually you'd want to stop blocking if a target was overly slow or unreachable.
Parameters:
  timeout - time to wait in milliseconds, or zeroto block forever -- usually changeTime makes sense.

 booleansetSocietyTime(long offset, double rate, long changeTime, long timeout)
    
 booleansetSocietyTime(long offset, double rate, long changeTime)
     A blocking setSocietyTime that uses the changeTime as the timeout -- this is the basis for all the other non-Callback/timeout setSocietyTime variations.
 voidsetSocietyTime(long time)
     Backwards-compatible blocking variations of DemoControlService.setSocietyTime(long,double,long) .
 voidsetSocietyTime(long time, boolean forceRunning)
    
 voidsetSocietyTimeRate(double rate)
    



Method Detail
advanceNodeTime
void advanceNodeTime(long period, double rate)(Code)



advanceSocietyTime
void advanceSocietyTime(long period)(Code)



advanceSocietyTime
void advanceSocietyTime(long period, boolean forceRunning)(Code)



advanceSocietyTime
void advanceSocietyTime(long period, double rate)(Code)



advanceSocietyTime
void advanceSocietyTime(ExecutionTimer.Change[] changes)(Code)



getExecutionRate
double getExecutionRate()(Code)
Get the local node's execution rate.



setLocalTime
void setLocalTime(long offset, double rate, long changeTime)(Code)
Schedule a thread to set the local agent's time at real-time changeTime to an execution-time of changeTime + offset and rate.



setNodeTime
void setNodeTime(long time, double rate, long changeTime)(Code)
Backwards-compatible variations of DemoControlService.setLocalTime(long,double,long) .

These methods use ExecutionTimer.create to create an ExecutionTimer.Change, which may mangle the timestamps when converting a "time" to an "offset".
See Also:   DemoControlService.setLocalTime(long,double,long)
See Also:   




setNodeTime
void setNodeTime(long time, double rate)(Code)



setSocietyTime
boolean setSocietyTime(long offset, double rate, long changeTime, Set targets, Callback cb)(Code)
Non-blocking method to set the node time at the specified nodes.
Parameters:
  offset - offset of real-time at the changeTime
Parameters:
  rate - time rate multiplier (e.g. 2 seconds per second)
Parameters:
  changeTime - real-time when the change should take place,which should allow enough time for messaging.
Parameters:
  cb - optional callback to monitor progress true if completed in this thread, which only happensif the targets list is empty or just the local node, otherwisethe callback is required to monitor the asynchronous progress.



setSocietyTime
boolean setSocietyTime(long offset, double rate, long changeTime, Callback cb)(Code)
Mostly non-blocking setSocietyTime to all nodes listed in the naming service, but the naming service lookup could block or return a partial list.
See Also:   DemoControlService.setSocietyTime(long,double,long,Set,DemoControlService.Callback)
See Also:   org.cougaar.core.wp.ListAllNodes
See Also:   



setSocietyTime
boolean setSocietyTime(long offset, double rate, long changeTime, Set targets, long timeout)(Code)
Blocking setSocietyTime variations with timeouts.

These are identical to the above Callback variations with a simple Callback that blocks on an "Object.wait(timeout)".

Callers should pass a timeout that's <= to the changeTime, since usually you'd want to stop blocking if a target was overly slow or unreachable.
Parameters:
  timeout - time to wait in milliseconds, or zeroto block forever -- usually changeTime makes sense. true if all advances completed before the timeout,otherwise false.
See Also:   DemoControlService.setSocietyTime(long,double,long,Set,DemoControlService.Callback)




setSocietyTime
boolean setSocietyTime(long offset, double rate, long changeTime, long timeout)(Code)

See Also:   DemoControlService.setSocietyTime(long,double,long,DemoControlService.Callback)



setSocietyTime
boolean setSocietyTime(long offset, double rate, long changeTime)(Code)
A blocking setSocietyTime that uses the changeTime as the timeout -- this is the basis for all the other non-Callback/timeout setSocietyTime variations.
See Also:   DemoControlService.setSocietyTime(long,double,long,Set,DemoControlService.Callback)



setSocietyTime
void setSocietyTime(long time)(Code)
Backwards-compatible blocking variations of DemoControlService.setSocietyTime(long,double,long) .

For legacy reasons these return "void" instead of a "boolean". Also, they use ExecutionTimer.create to create an ExecutionTimer.Change, which may mangle the timestamps when converting a "time" to an "offset".
See Also:   DemoControlService.setSocietyTime(long,double,long,Set,DemoControlService.Callback)




setSocietyTime
void setSocietyTime(long time, boolean forceRunning)(Code)



setSocietyTimeRate
void setSocietyTimeRate(double rate)(Code)



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