Package com.avpkit.mediatool
Class AMediaGeneratorMixin
- java.lang.Object
-
- com.avpkit.mediatool.AMediaGeneratorMixin
-
- Direct Known Subclasses:
AMediaToolMixin,MediaGeneratorAdapter
public abstract class AMediaGeneratorMixin extends java.lang.Object
An abstract implementation of allIMediaGeneratormethods, but does not declareIMediaGenerator.This class manages all attached
IMediaListenerobjects in a thread-safe set. The is fast to iterate over -- at the expense of a copy onaddListener(IMediaListener)andremoveListener(IMediaListener).Mixin classes can be extended by anyone, but the extending class gets to decide which, if any, of the interfaces they actually want to support.
- Author:
- trebor, aclarke
-
-
Constructor Summary
Constructors Constructor Description AMediaGeneratorMixin()Create anAMediaGeneratorMixin.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddListener(IMediaListener listener)Adds this listener to a thread-safe set.java.util.Collection<IMediaListener>getListeners()Get a read-only collection of addedIMediaListenerobjects.booleanremoveListener(IMediaListener listener)Remove this listener from the thread-safe set ofIMediaListenerobjects.
-
-
-
Constructor Detail
-
AMediaGeneratorMixin
public AMediaGeneratorMixin()
Create anAMediaGeneratorMixin.
-
-
Method Detail
-
addListener
public boolean addListener(IMediaListener listener)
Adds this listener to a thread-safe set.- Returns:
- true if the set was modified when adding this call.
-
removeListener
public boolean removeListener(IMediaListener listener)
Remove this listener from the thread-safe set ofIMediaListenerobjects.- Returns:
- true if the set was modified by this call.
-
getListeners
public java.util.Collection<IMediaListener> getListeners()
Get a read-only collection of addedIMediaListenerobjects.- Returns:
- a read-only collection of
IMediaListenerobjects.
-
-