!act,doc #2922 Doc event bus and fix Java API
This commit is contained in:
parent
f1edf78979
commit
a247365b57
13 changed files with 803 additions and 168 deletions
|
|
@ -23,15 +23,18 @@ trait EventBus {
|
|||
type Classifier
|
||||
type Subscriber
|
||||
|
||||
//#event-bus-api
|
||||
/**
|
||||
* Attempts to register the subscriber to the specified Classifier
|
||||
* @return true if successful and false if not (because it was already subscribed to that Classifier, or otherwise)
|
||||
* @return true if successful and false if not (because it was already
|
||||
* subscribed to that Classifier, or otherwise)
|
||||
*/
|
||||
def subscribe(subscriber: Subscriber, to: Classifier): Boolean
|
||||
|
||||
/**
|
||||
* Attempts to deregister the subscriber from the specified Classifier
|
||||
* @return true if successful and false if not (because it wasn't subscribed to that Classifier, or otherwise)
|
||||
* @return true if successful and false if not (because it wasn't subscribed
|
||||
* to that Classifier, or otherwise)
|
||||
*/
|
||||
def unsubscribe(subscriber: Subscriber, from: Classifier): Boolean
|
||||
|
||||
|
|
@ -44,6 +47,7 @@ trait EventBus {
|
|||
* Publishes the specified Event to this bus
|
||||
*/
|
||||
def publish(event: Event): Unit
|
||||
//#event-bus-api
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -118,6 +122,9 @@ trait LookupClassification { this: EventBus ⇒
|
|||
*/
|
||||
trait SubchannelClassification { this: EventBus ⇒
|
||||
|
||||
/**
|
||||
* The logic to form sub-class hierarchy
|
||||
*/
|
||||
protected implicit def subclassification: Subclassification[Classifier]
|
||||
|
||||
// must be lazy to avoid initialization order problem with subclassification
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue