Java Doc for BlackboardService.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.BlackboardService

BlackboardService
public interface BlackboardService extends Service(Code)
This service provides transactional publish/subscribe access to the local agent's blackboard.

Most developers should extend org.cougaar.core.plugin.ComponentPlugin to handle threading and opening/closing transactions.


Inner Class :class Delegate implements BlackboardService



Method Summary
 voidcloseTransaction()
     Close a transaction opened by openTransaction() or a successful tryOpenTransaction(), flushing the change tracking (delta) lists of any open subscriptions.
 voidcloseTransaction(boolean resetp)
     Close a transaction opened by openTransaction() or a successful tryOpenTransaction().
 voidcloseTransactionDontReset()
     Close a transaction opened by openTransaction() or a successful tryOpenTransaction(), but don't reset subscription changes or clear delta lists.
 booleandidRehydrate()
    
 PersistencegetPersistence()
    
 intgetPublishAddedCount()
    
 intgetPublishChangedCount()
    
 intgetPublishRemovedCount()
    
 SubscribergetSubscriber()
    
 intgetSubscriptionCount()
    
 intgetSubscriptionSize()
    
 booleanhaveCollectionsChanged()
    
 booleanisTransactionOpen()
     Check to see if a transaction is open and owned by the current thread.
 voidopenTransaction()
     Open a transaction by grabbing the transaction lock and updating the subscriptions.
 voidpersistNow()
     Take a persistence snapshot now.
 voidpublishAdd(Object o)
    
 voidpublishChange(Object o)
    
 voidpublishChange(Object o, Collection changes)
     mark an element of the Plan as changed. Behavior is not defined if the object is not a member of the plan. There is no need to call this if the object was added or removed, only if the contents of the object itself has been changed. The changes parameter describes a set of changes made to the object beyond those tracked automatically by the object class (see the object class documentation for a description of which types of changes are tracked).
 voidpublishRemove(Object o)
    
 Collectionquery(UnaryPredicate isMember)
     Issue a query against the logplan.
 SubscriptionWatcherregisterInterest(SubscriptionWatcher w)
    
 SubscriptionWatcherregisterInterest()
    
 voidsetShouldBePersisted(boolean value)
     indicate that this blackboard service information should (or should not) be persisted.
 booleanshouldBePersisted()
    
 voidsignalClientActivity()
     called when the client (Plugin) requests that it be waked again.
 Subscriptionsubscribe(UnaryPredicate isMember)
     Request a subscription to all objects for which isMember.execute(object) is true.
 Subscriptionsubscribe(UnaryPredicate isMember, Collection realCollection)
     like subscribe(UnaryPredicate), but allows specification of some other type of Collection object as the internal representation of the collection.
 Subscriptionsubscribe(UnaryPredicate isMember, boolean isIncremental)
    
 Subscriptionsubscribe(UnaryPredicate isMember, Collection realCollection, boolean isIncremental)
     Alias for getSubscriber().subscribe(UnaryPredicate, Collection, boolean);
Parameters:
  isMember - a predicate to execute to ascertainmembership in the collection of the subscription.
Parameters:
  realCollection - a container to hold the contents of the subscription.
Parameters:
  isIncremental - should be true if an incremental subscription is desired.An incremental subscription provides access to the incremental changes to the subscription.
 Subscriptionsubscribe(Subscription subscription)
     Primary subscribe method, which registers a new subscription.
 booleantryOpenTransaction()
     Attempt to open a transaction by attempting to grab the transaction lock and updating the collections (iff we got the lock).
 voidunregisterInterest(SubscriptionWatcher w)
    
 voidunsubscribe(Subscription subscription)
     Cancels the given Subscription which must have been returned by a previous invocation of subscribe().



Method Detail
closeTransaction
void closeTransaction() throws SubscriberException(Code)
Close a transaction opened by openTransaction() or a successful tryOpenTransaction(), flushing the change tracking (delta) lists of any open subscriptions.
exception:
  SubscriberException - IFF we did not own the transactionlock.



closeTransaction
void closeTransaction(boolean resetp) throws SubscriberException(Code)
Close a transaction opened by openTransaction() or a successful tryOpenTransaction().
Parameters:
  resetp - IFF true, all subscriptions will havetheir resetChanges() method called to clear any delta lists, etc.
exception:
  SubscriberException - IFF we did not own the transactionlock.BlackboardService.closeTransactionDontReset closeTransactionDontReset



closeTransactionDontReset
void closeTransactionDontReset()(Code)
Close a transaction opened by openTransaction() or a successful tryOpenTransaction(), but don't reset subscription changes or clear delta lists. In effect, defers changes tracked until next transaction.
exception:
  SubscriberException - IFF we did not own the transactionlock.



didRehydrate
boolean didRehydrate()(Code)
is this BlackboardService the result of a rehydration of a persistence snapshot?



getPersistence
Persistence getPersistence()(Code)
Hook to allow access to Blackboard persistence mechanism



getPublishAddedCount
int getPublishAddedCount()(Code)



getPublishChangedCount
int getPublishChangedCount()(Code)



getPublishRemovedCount
int getPublishRemovedCount()(Code)



getSubscriber
Subscriber getSubscriber()(Code)



getSubscriptionCount
int getSubscriptionCount()(Code)



getSubscriptionSize
int getSubscriptionSize()(Code)



haveCollectionsChanged
boolean haveCollectionsChanged()(Code)
true iff collection contents have changed since the last transaction.



isTransactionOpen
boolean isTransactionOpen()(Code)
Check to see if a transaction is open and owned by the current thread. There is no method to check to see if the subscribe has a transaction open which is owned by a different thread, since that would not be a safe operation. true IFF the current thread already has an open transaction.



openTransaction
void openTransaction()(Code)
Open a transaction by grabbing the transaction lock and updating the subscriptions. This method blocks waiting for the transaction lock.



persistNow
void persistNow() throws PersistenceNotEnabledException(Code)
Take a persistence snapshot now. If called from inside a transaction (the usual case for a plugin), the transaction will be closed and reopened. This means that a plugin must first process all of its existing envelopes before calling persistNow() and then process a potential new set of envelopes after re-opening the transaction. Otherwise, the changes will be lost.
exception:
  PersistenceNotEnabledException -



publishAdd
void publishAdd(Object o)(Code)



publishChange
void publishChange(Object o)(Code)



publishChange
void publishChange(Object o, Collection changes)(Code)
mark an element of the Plan as changed. Behavior is not defined if the object is not a member of the plan. There is no need to call this if the object was added or removed, only if the contents of the object itself has been changed. The changes parameter describes a set of changes made to the object beyond those tracked automatically by the object class (see the object class documentation for a description of which types of changes are tracked). Any additional changes are merged in after automatically collected reports.
Parameters:
  changes - a set of ChangeReport instances or null.



publishRemove
void publishRemove(Object o)(Code)



query
Collection query(UnaryPredicate isMember)(Code)
Issue a query against the logplan. Similar in function to opening a new subscription, getting the results and immediately closing the subscription, but can be implemented much more efficiently. Note: the initial implementation actually does exactly this.



registerInterest
SubscriptionWatcher registerInterest(SubscriptionWatcher w)(Code)
register a watcher of subscription activity



registerInterest
SubscriptionWatcher registerInterest()(Code)
register a watcher of subscription activity



setShouldBePersisted
void setShouldBePersisted(boolean value)(Code)
indicate that this blackboard service information should (or should not) be persisted.



shouldBePersisted
boolean shouldBePersisted()(Code)
the current value of the persistence setting



signalClientActivity
void signalClientActivity()(Code)
called when the client (Plugin) requests that it be waked again. by default, just calls wakeSubscriptionWatchers, but subclasses may be more circumspect.



subscribe
Subscription subscribe(UnaryPredicate isMember)(Code)
Request a subscription to all objects for which isMember.execute(object) is true. The returned Collection is a transactionally-safe set of these objects which is guaranteed not to change out from under you during run() execution. subscribe() may be called any time after load() completes.



subscribe
Subscription subscribe(UnaryPredicate isMember, Collection realCollection)(Code)
like subscribe(UnaryPredicate), but allows specification of some other type of Collection object as the internal representation of the collection. Alias for getSubscriber().subscribe(UnaryPredicate, Collection);



subscribe
Subscription subscribe(UnaryPredicate isMember, boolean isIncremental)(Code)
Alias for getSubscriber().subscribe(UnaryPredicate, boolean);



subscribe
Subscription subscribe(UnaryPredicate isMember, Collection realCollection, boolean isIncremental)(Code)
Alias for getSubscriber().subscribe(UnaryPredicate, Collection, boolean);
Parameters:
  isMember - a predicate to execute to ascertainmembership in the collection of the subscription.
Parameters:
  realCollection - a container to hold the contents of the subscription.
Parameters:
  isIncremental - should be true if an incremental subscription is desired.An incremental subscription provides access to the incremental changes to the subscription. the Subsciption.
See Also:   org.cougaar.core.blackboard.Subscriber.subscribe
See Also:   org.cougaar.core.blackboard.Subscription



subscribe
Subscription subscribe(Subscription subscription)(Code)
Primary subscribe method, which registers a new subscription.



tryOpenTransaction
boolean tryOpenTransaction()(Code)
Attempt to open a transaction by attempting to grab the transaction lock and updating the collections (iff we got the lock). This is equivalent to the old (misnamed) tryLockSubscriber method in PluginWrapper. true IFF a transaction was opened.



unregisterInterest
void unregisterInterest(SubscriptionWatcher w) throws SubscriberException(Code)
stop watching subscription activity



unsubscribe
void unsubscribe(Subscription subscription)(Code)
Cancels the given Subscription which must have been returned by a previous invocation of subscribe(). Alias for getSubscriber().unsubscribe(Subscription).
Parameters:
  subscription - the subscription to cancel
See Also:   org.cougaar.core.blackboard.Subscriber.unsubscribe



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