Package engineering.swat.watch.impl.util
Class BundledSubscription<Key extends @NonNull Object,Event extends @NonNull Object>
- java.lang.Object
-
- engineering.swat.watch.impl.util.BundledSubscription<Key,Event>
-
- All Implemented Interfaces:
ISubscribable<Key,Event>
public class BundledSubscription<Key extends @NonNull Object,Event extends @NonNull Object> extends Object implements ISubscribable<Key,Event>
This is an internal class where we can join multiple subscriptions to the same target by only taking 1 actual subscription but forwarding them to all the interested parties. This is used (for example) to avoid multiple JDKPoller registries for the same path
-
-
Constructor Summary
Constructors Constructor Description BundledSubscription(ISubscribable<Key,Event> wrapped)
-
-
-
Constructor Detail
-
BundledSubscription
public BundledSubscription(ISubscribable<Key,Event> wrapped)
-
-
Method Detail
-
subscribe
public Closeable subscribe(Key target, Consumer<Event> eventListener) throws IOException
- Specified by:
subscribe
in interfaceISubscribable<Key extends @NonNull Object,Event extends @NonNull Object>
- Throws:
IOException
-
-