Package com.teamdev.jxbrowser.event
Interface Observable<T extends Event>
- Type Parameters:
T
- the common type of the observed events
- All Known Subinterfaces:
Audio
,Browser
,CaptureSession
,CastSession
,CastSessions
,Download
,Engine
,FullScreen
,MediaReceiver
,MediaReceivers
,Navigation
,Network
,PrintJob<PrintSettingT>
,ZoomLevels
public interface Observable<T extends Event>
An observable object.
An observable object can have one or more observers. Each observer is associated with a particular event class.
-
Method Summary
Modifier and TypeMethodDescription<E extends T>
SubscriptionSubscribes the given eventobserver
to receive the events of the giveneventClass
.
-
Method Details
-
on
Subscribes the given eventobserver
to receive the events of the giveneventClass
. The order in which notifications will be delivered to the registered listeners is not specified. The method does nothing if the givenobserver
has been already registered.- Type Parameters:
E
- the event type- Parameters:
eventClass
- the event classobserver
- the event observer to subscribe- Returns:
- a
Subscription
reference with which the subscribers can unsubscribe from theObservable
. If the given observer is already registered, returns a reference to already createdSubscription
.
-