Package com.tangosol.net.topic
Class Subscriber.ChannelOwnershipListeners<V>
java.lang.Object
com.tangosol.net.topic.Subscriber.ChannelOwnershipListeners<V>
- Type Parameters:
V- the type of the elements being received from the topic
- All Implemented Interfaces:
Subscriber.Option<V,V>
- Enclosing interface:
Subscriber<V>
public static class Subscriber.ChannelOwnershipListeners<V>
extends Object
implements Subscriber.Option<V,V>
A subscriber
Subscriber.Option that allows one or more listeners
to be added to the subscriber, that will be notified of changes to the subscribers channel
ownership.-
Field Summary
Fields inherited from interface com.tangosol.net.topic.Subscriber.Option
NULL_OPTION -
Method Summary
Modifier and TypeMethodDescriptionReturns the list oflistenersto add to the subscriber.static <V> Subscriber.ChannelOwnershipListeners<V> none()Create aSubscriber.ChannelOwnershipListenersoption with zerolisteners.static <V> Subscriber.ChannelOwnershipListeners<V> of(Subscriber.ChannelOwnershipListener... aListener) Create aSubscriber.ChannelOwnershipListenersoption with one or morelisteners.static <V> Subscriber.ChannelOwnershipListeners<V> withListener(Subscriber.ChannelOwnershipListener... aListener) Create aSubscriber.ChannelOwnershipListenersoption with one or morelisteners.
-
Method Details
-
getListeners
Returns the list oflistenersto add to the subscriber.- Returns:
- the list of
listenersto add to the subscriber
-
of
public static <V> Subscriber.ChannelOwnershipListeners<V> of(Subscriber.ChannelOwnershipListener... aListener) Create aSubscriber.ChannelOwnershipListenersoption with one or morelisteners.- Type Parameters:
V- the type of the elements being received from the topic- Parameters:
aListener- thelistenersto add to the subscriber- Returns:
- a
Subscriber.ChannelOwnershipListenersoption with one or morelisteners
-
withListener
public static <V> Subscriber.ChannelOwnershipListeners<V> withListener(Subscriber.ChannelOwnershipListener... aListener) Create aSubscriber.ChannelOwnershipListenersoption with one or morelisteners.- Type Parameters:
V- the type of the elements being received from the topic- Parameters:
aListener- thelistenersto add to the subscriber- Returns:
- a
Subscriber.ChannelOwnershipListenersoption with one or morelisteners
-
none
Create aSubscriber.ChannelOwnershipListenersoption with zerolisteners.- Type Parameters:
V- the type of the elements being received from the topic- Returns:
- a
Subscriber.ChannelOwnershipListenersoption with one or morelisteners
-