public abstract class AbstractFaceQueue extends java.lang.Object implements FaceQueue
FaceQueue
. This class
maintains the FaceQueueListeners
; implementing
classes need to implement only the actual face loading code.Modifier and Type | Field and Description |
---|---|
private EventListenerList2<FaceQueueListener> |
faceQueueListeners
The registered
FaceQueueListeners . |
Constructor and Description |
---|
AbstractFaceQueue() |
Modifier and Type | Method and Description |
---|---|
void |
addFaceQueueListener(FaceQueueListener faceQueueListener)
Adds a
FaceQueueListener to be notified about processed faces. |
protected void |
fireFaceFailed(Face face)
Notify all listener with
FaceQueueListener.faceFailed(Face) . |
protected void |
fireFaceLoaded(Face face,
FaceImages faceImages)
Notify all listener with
FaceQueueListener.faceLoaded(Face,
FaceImages) . |
void |
removeFaceQueueListener(FaceQueueListener faceQueueListener)
Removes a
FaceQueueListener to be notified about processed
faces. |
@NotNull private final EventListenerList2<FaceQueueListener> faceQueueListeners
FaceQueueListeners
.public void addFaceQueueListener(@NotNull FaceQueueListener faceQueueListener)
FaceQueueListener
to be notified about processed faces.addFaceQueueListener
in interface FaceQueue
faceQueueListener
- the listener to addprotected void fireFaceFailed(@NotNull Face face)
FaceQueueListener.faceFailed(Face)
.face
- the face that has failed to loadprotected void fireFaceLoaded(@NotNull Face face, @NotNull FaceImages faceImages)
FaceQueueListener.faceLoaded(Face,
FaceImages)
.face
- the face that has been loadedfaceImages
- the face images instance that has been loadedpublic void removeFaceQueueListener(@NotNull FaceQueueListener faceQueueListener)
FaceQueueListener
to be notified about processed
faces.removeFaceQueueListener
in interface FaceQueue
faceQueueListener
- the listener to remove