org.cougaar.core.blackboard |
This package contains the Cougaar
publish/subscribe {@link org.cougaar.core.service.BlackboardService}.
The standard agent contains a {@link
org.cougaar.core.blackboard.StandardBlackboard}
component that provides the {@link
org.cougaar.core.service.BlackboardService}, which is a wrapper
around the {@link org.cougaar.core.blackboard.Subscriber}
class. The StandardBlackboard creates the {@link
org.cougaar.core.blackboard.Distributor}, which
manages the subscribers, and the special {@link
org.cougaar.core.blackboard.Blackboard} subscriber
to maintain a view of all blackboard objects and
invoke {@link org.cougaar.core.domain.Domain} {@link
org.cougaar.core.domain.LogicProvider}s. Each subscriber has a set
of {@link org.cougaar.core.blackboard.Subscription}s that are known
only to that subscriber. A subscriber registers with the distributor
to receive blackboard add/change/remove notification "tuples".
When a subscriber wishes to modify the blackboard contents,
it must start a distributor transaction, fill an envelope with
add/change/remove tuples, and finish the distributor transaction.
The distributor also coordinates periodic persistence and ensures
that blackboard updates are thread-safe.
For more detail, see the
Cougaar Developers' Guide.
|
Java Source File Name | Type | Comment |
ABATranslation.java | Interface | A community membership change description for an
org.cougaar.multicast.AttributeBasedAddress , used by
org.cougaar.core.domain.Domain
org.cougaar.core.domain.ABAChangeLogicProvider s. |
AckDirectiveMessage.java | Class | A
MessageManager delivery acknowledgement if non-lazy
persistence is enabled. |
AckSet.java | Class | A bit set for keeping track of sequence numbers, used by
the
MessageManager .
This is similar to a BitSet, but has a shifting base index. |
ActiveSubscriptionObject.java | Interface | Marker interface for blackboard objects that react to
a
org.cougaar.core.service.BlackboardServiceorg.cougaar.core.service.BlackboardService.publishAdd ,
org.cougaar.core.service.BlackboardService.publishChange ,
or
org.cougaar.core.service.BlackboardService.publishRemove calls. |
AddEnvelopeTuple.java | Class | An
EnvelopeTuple indicating that an object has been added
to the blackboard. |
AnonymousChangeReport.java | Class | A change report for an anonymous (unspecified) change. |
Blackboard.java | Class | A
Subscriber created by the
StandardBlackboard that maintains a view of all published objects, invokes
org.cougaar.core.domain.Domain
org.cougaar.core.domain.LogicProvider s, and monitors
community membership changes. |
BlackboardAlert.java | Class | A generic blackboard alert object used to notify agent or plugin
about anomalous data on an agent's blackboard. |
BlackboardAlertRelay.java | Class | Implementation of a relay class that contains a BlackboardAlert
object as its content. |
BlackboardClient.java | Interface | Required service requestor API for the
org.cougaar.core.service.BlackboardService . |
BlackboardClientComponent.java | Class | This component is a standard base class for
Component s
that use the
BlackboardService .
Plugins are the most common example of such components.
ComponentPlugin is an extension of this class.
Create a derived class by implementing
setupSubscriptions() and execute().
Note that both "precycle()" and "cycle()" will be run by the
scheduler. |
BlackboardException.java | Class | An unchecked exception thrown when there is a problem detected by
blackboard interactions. |
BlackboardForAgent.java | Interface | This service is used by agent components to manage the blackboard. |
BlackboardServesDomain.java | Interface | A
org.cougaar.core.domain.Domain s view of the blackboard. |
BlackboardServiceProvider.java | Class | The service provider for the
BlackboardService ,
BlackboardQueryService , and
BlackboardMetricsService .
All operations are backed by the
org.cougaar.core.blackboard.Distributor . |
BulkEnvelopeTuple.java | Class | An
EnvelopeTuple indicating that a collection of objects
have been added to the blackboard. |
ChangeEnvelopeTuple.java | Class | An
EnvelopeTuple indicating that an object on the
blackboard has been modified. |
ChangeReport.java | Interface | A marker interface for describing a change to an object on the
blackboard.
ChangeReports are published by using
org.cougaar.core.service.BlackboardService.publishChange(ObjectCollection) and are viewed by using
CollectionSubscription.getChangeReports(Object) .
Subclasses describe specific types of changes.
The hashCode and equals methods should compute their return values
based on the type and not any specific (old) value which may be
stored in the object. |
Claimable.java | Interface | An object "claimed" by a single actor, typically a plugin
instance. |
ClaimableHolder.java | Interface | An indirect holder of a
Claimable . |
ClaimableImpl.java | Class | Implementation of the
Claimable API. |
ClaimableImplBeanInfo.java | Class | A BeanInfo property description for
ClaimableImpl . |
CollectionSubscription.java | Class | A subclass of
Subscription that maintains a
Collection of blackboard objects matching the filter
predicate, plus
ChangeReport s for the objects changed
since the last transaction. |
DeltaSubscription.java | Class | A subscription that only tracks add/change/remove deltas.
See
CollectionSubscription for a system property that identifies
subscriptions that could potentially be changed to DeltaSubscriptions.
We subclass
IncrementalSubscription to both reuse code and to make
it easy for existing plugins to switch over to this class. |
Directive.java | Interface | A blackboard object that directly corresponds to an inter-agent
Message. |
DirectiveImpl.java | Class | A standard base class for
Directive s. |
DirectiveMessage.java | Class | A
org.cougaar.core.mts.Message containing
Directive s. |
Distributor.java | Class | The Distributor coordinates blackboard transactions, subscriber
updates, and persistence. |
Envelope.java | Class | A container for blackboard add/change/remove
EnvelopeTuple s of a single transaction. |
EnvelopeMetrics.java | Class | Contains metrics on transaction open and close timestamps. |
EnvelopeMetricsSubscription.java | Class | A
Subscription that collects
EnvelopeMetrics . |
EnvelopeTuple.java | Class | A container for a tranaction's add/change/remove of a single
object. |
IncrementalSubscription.java | Class | A
CollectionSubscription that records add/change/remove
deltas. |
InitializeSubscriptionEnvelope.java | Class | A special blackboard-internal
Envelope used to initialize
a
Subscription .
Any transaction envelopes received by the client for a newly
created subscription prior to this envelope are ignored. |
MessageManager.java | Interface | A message acknowledgement manager used by the
org.cougaar.core.blackboard.Distributor 's non-lazy persistence
mode to ensure that unacknowledged messages are persisted. |
MessageManagerImpl.java | Class | A message acknowledgement manager used by the
Distributor 's
non-lazy persistence mode to ensure that unacknowledged messages
are persisted. |
NewDirective.java | Interface | Modifiable interface for a
Directive . |
ObjectTracker.java | Class | A generic object tracker which is currently used to identify
CollectionSubscription s that could be converted into
DeltaSubscription s. |
OverrideChangeReport.java | Interface | A ChangeReport that should override old ones in the same transaction. |
PersistenceEnvelope.java | Class | An
Envelope sent by persistence to restore a rehydrated
blackboard. |
PrivilegedClaimant.java | Interface | A marker interface for
Subscriber s that are allowed
to modify
Claimable blackboard objects even if they
are not the owner (typically just the
Blackboard ).
Note that Claim warnings are currently just warnings,
regardless of how scary looking they are. |
Publishable.java | Interface | An optional marker interface for objects that can be published to
the blackboard.
NOTE: at some point, only Publishable objects will be
admitted to the blackboard. |
PublishableAdapter.java | Class | A useful base class for objects which implement the
Publishable interface. |
PublisherInfo.java | Class | A data structure returned by
PublisherSubscription . |
PublisherSubscription.java | Class | A subscription that tracks the plugin publisher and add/change stacks for
UniqueObjects. |
PublishException.java | Class | An
IllegalArgumentException for invalid or failed publish
operations. |
PublishHistory.java | Class | A record of the recent publication history, enabled by the
org.cougaar.core.blackboard.Distributor 's
"keepPublishHistory" option, that can be used to help debug
apparently anomalous publish events. |
PublishStack.java | Class | A stacktrace holder for
Blackboard "savePriorPublisher"
tracking of blackboard objects and their publishers. |
QuerySubscription.java | Class | A lightweight
CollectionSubscription used to take a
single "query" snapshot of the blackboard. |
QuiescenceMonitor.java | Class | The QuiescenceMonitor is used by the
Distributor to
determine if an agent is quiescent.
The QM tracks which blackboard clients we care about quiescence
for, and numbers incoming and outgoing messsages for those we care
about. |
RemoveEnvelopeTuple.java | Class | An
EnvelopeTuple indicating that an object has been
removed from the blackboard. |
ReservationManager.java | Class | The ReservationManager coordinates
org.cougaar.core.blackboard.Distributor persistence to ensure
that only one agent can persist at a time, and that an agent
preparing to persist will not block other agents from
persisting.
Persistence reservations indicate that a persistence instance
wishes to take a snapshot of its agent. |
StandardBlackboard.java | Class | This component advertises the
BlackboardService and manages the
Blackboard . |
Subscriber.java | Class | The standard implementation of the
org.cougaar.core.service.BlackboardService . |
SubscriberException.java | Class | An exception thrown by a
Subscriber . |
Subscription.java | Class | A filtered view of the blackboard that is updated between
org.cougaar.core.service.BlackboardService transactions. |
SubscriptionException.java | Class | An unchecked exception thrown when a problem is detected by
subscription mechanisms. |
SubscriptionWatcher.java | Class | A callback for
org.cougaar.core.service.BlackboardService.registerInterest subscription or alarm activity.
On the
SubscriptionWatcher.signalNotify callback, the watcher should schedule
itself to run in a separate thread, e.g. |
TimestampedEnvelope.java | Class | An envelope that records the subscriber name, time of
"openTransaction()", and time of "closeTransaction()". |
TimestampEntry.java | Class | The creation time and most recent modification time for a
org.cougaar.core.util.UniqueObject on the blackboard. |
TimestampSubscription.java | Class | A
Subscription that tracks
UniqueObject publishAdd
and most recent publishChange timestamps. |
TodoSubscription.java | Class | A subscription that queues objects, such as Alarms and other non-blackboard
callbacks, for processing in the plugin's "execute()" thread.
TodoSubscriptions are typically used for Alarm callbacks, for example:
public class MyPlugin extends ComponentPlugin {
private TodoSubscription expiredAlarms;
protected void setupSubscriptions() {
expiredAlarms = (TodoSubscription)
blackboard.subscribe(new TodoSubscription("x"));
// wake up in 10 seconds
getAlarmService().addRealTimeAlarm(
new MyAlarm(System.currentTimeMillis() + 10000));
}
protected void execute() {
if (expiredAlarms.hasChanged()) {
System.out.println("Due alarms: "+expiredAlarms.getAddedCollection());
}
}
private class MyAlarm extends AlarmBase {
// optionally add fields here, e.g. |
Transaction.java | Class | Required transaction support to record a thread's active
Subscriber and maintain attached ChangeReports. |
UniqueObjectSet.java | Class | A custom
java.util.Set that maintains a
java.util.Map -like associations from
UID s to
UniqueObject s. |