Class TarantoolConnectionListeners
- java.lang.Object
-
- io.tarantool.driver.api.connection.TarantoolConnectionListeners
-
public class TarantoolConnectionListeners extends Object
Helper class. Maintains a collection ofTarantoolConnectionListener
-
-
Constructor Summary
Constructors Constructor Description TarantoolConnectionListeners()
Basic constructor.TarantoolConnectionListeners(List<TarantoolConnectionListener> tarantoolConnectionListeners)
Allows to add several listeners right on instantiation.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TarantoolConnectionListeners
add(TarantoolConnectionListener listener)
Add a singleTarantoolConnectionListener
to collectionList<TarantoolConnectionListener>
all()
Returns all listeners previously added to the collectionTarantoolConnectionListeners
clear()
Remove all previously added listeners, leaving the collection emptystatic TarantoolConnectionListeners
of(TarantoolConnectionListener... listeners)
Construct a collection from an enumeration ofTarantoolConnectionListener
-
-
-
Constructor Detail
-
TarantoolConnectionListeners
public TarantoolConnectionListeners()
Basic constructor.
-
TarantoolConnectionListeners
public TarantoolConnectionListeners(List<TarantoolConnectionListener> tarantoolConnectionListeners)
Allows to add several listeners right on instantiation.- Parameters:
tarantoolConnectionListeners
- connection listeners
-
-
Method Detail
-
add
public TarantoolConnectionListeners add(TarantoolConnectionListener listener)
Add a singleTarantoolConnectionListener
to collection- Parameters:
listener
- connection listener- Returns:
- this instance
-
all
public List<TarantoolConnectionListener> all()
Returns all listeners previously added to the collection- Returns:
- a copy of the listeners collection
-
clear
public TarantoolConnectionListeners clear()
Remove all previously added listeners, leaving the collection empty- Returns:
- this instance
-
of
public static TarantoolConnectionListeners of(TarantoolConnectionListener... listeners)
Construct a collection from an enumeration ofTarantoolConnectionListener
- Parameters:
listeners
- connection listeners- Returns:
- new
TarantoolConnectionListeners
instance
-
-