Crossfire JXClient, Trunk  R20561
com.realtime.crossfire.jxclient.faces.FacesQueue Class Reference

The main FaceQueue for loading faces. More...

+ Inheritance diagram for com.realtime.crossfire.jxclient.faces.FacesQueue:
+ Collaboration diagram for com.realtime.crossfire.jxclient.faces.FacesQueue:

Public Member Functions

 FacesQueue (@NotNull final FaceQueue faceQueue, @NotNull final ImageCache imageCacheOriginal, @NotNull final ImageCache imageCacheScaled, @NotNull final ImageCache imageCacheMagicMap)
 Creates a new instance. More...
 
void loadFace (@NotNull final Face face)
 Request a face.Must eventually call either FaceQueueListener#faceLoaded(Face, FaceImages) or FaceQueueListener#faceFailed(Face) for the face. Faces re-requested while still processing may be notified only once.

Parameters
facethe requested face
More...
 
void reset ()
 Reset the processing: forget about pending faces.This function is called whenever the server socket breaks, or when a new connection has been established. More...
 
- Public Member Functions inherited from com.realtime.crossfire.jxclient.faces.AbstractFaceQueue
void addFaceQueueListener (@NotNull final FaceQueueListener faceQueueListener)
 Adds a FaceQueueListener to be notified about processed faces.
Parameters
faceQueueListenerthe listener to add
More...
 
void removeFaceQueueListener (@NotNull final FaceQueueListener faceQueueListener)
 Removes a FaceQueueListener to be notified about processed faces.
Parameters
faceQueueListenerthe listener to remove
More...
 

Private Attributes

final FaceQueueListener askfaceFaceQueueListener
 The FaceQueueListener attached to faceQueue. More...
 
final FaceQueue faceQueue
 The FaceQueue instance used to query faces from the Crossfire server. More...
 
final FileCacheFaceQueue fileCacheFaceQueue
 The FileCacheFaceQueue instance used to load faces from the file cache. More...
 
final FaceQueueListener fileCacheFaceQueueListener
 The FaceQueueListener attached to fileCacheFaceQueue. More...
 

Additional Inherited Members

- Protected Member Functions inherited from com.realtime.crossfire.jxclient.faces.AbstractFaceQueue
void fireFaceFailed (@NotNull final Face face)
 Notify all listener with FaceQueueListener#faceFailed(Face). More...
 
void fireFaceLoaded (@NotNull final Face face, @NotNull final FaceImages faceImages)
 Notify all listener with FaceImages). More...
 

Detailed Description

The main FaceQueue for loading faces.

It first delegates to a FileCacheFaceQueue to load the face from the disk cache. If this fails, the face is requested through a AskfaceFaceQueue.

Author
Andreas Kirschbaum

Definition at line 32 of file FacesQueue.java.

Constructor & Destructor Documentation

◆ FacesQueue()

com.realtime.crossfire.jxclient.faces.FacesQueue.FacesQueue ( @NotNull final FaceQueue  faceQueue,
@NotNull final ImageCache  imageCacheOriginal,
@NotNull final ImageCache  imageCacheScaled,
@NotNull final ImageCache  imageCacheMagicMap 
)

Creates a new instance.

Parameters
faceQueuethe face queue for sending askface commands
imageCacheOriginalthe image cache used for loading original image files
imageCacheScaledthe image cache used for loading scaled image files
imageCacheMagicMapthe image cache used for loading magic map image files

Definition at line 97 of file FacesQueue.java.

References com.realtime.crossfire.jxclient.faces.AbstractFaceQueue.addFaceQueueListener(), com.realtime.crossfire.jxclient.faces.FacesQueue.askfaceFaceQueueListener, com.realtime.crossfire.jxclient.faces.FacesQueue.faceQueue, com.realtime.crossfire.jxclient.faces.FacesQueue.fileCacheFaceQueue, and com.realtime.crossfire.jxclient.faces.FacesQueue.fileCacheFaceQueueListener.

+ Here is the call graph for this function:

Member Function Documentation

◆ loadFace()

void com.realtime.crossfire.jxclient.faces.FacesQueue.loadFace ( @NotNull final Face  face)

Request a face.Must eventually call either FaceQueueListener#faceLoaded(Face, FaceImages) or FaceQueueListener#faceFailed(Face) for the face. Faces re-requested while still processing may be notified only once.

Parameters
facethe requested face

Implements com.realtime.crossfire.jxclient.faces.FaceQueue.

Definition at line 117 of file FacesQueue.java.

References com.realtime.crossfire.jxclient.faces.FacesQueue.fileCacheFaceQueue, and com.realtime.crossfire.jxclient.faces.FileCacheFaceQueue.loadFace().

+ Here is the call graph for this function:

◆ reset()

void com.realtime.crossfire.jxclient.faces.FacesQueue.reset ( )

Reset the processing: forget about pending faces.This function is called whenever the server socket breaks, or when a new connection has been established.

Implements com.realtime.crossfire.jxclient.faces.FaceQueue.

Definition at line 108 of file FacesQueue.java.

References com.realtime.crossfire.jxclient.faces.FacesQueue.faceQueue, com.realtime.crossfire.jxclient.faces.FacesQueue.fileCacheFaceQueue, com.realtime.crossfire.jxclient.faces.FaceQueue.reset(), and com.realtime.crossfire.jxclient.faces.FileCacheFaceQueue.reset().

+ Here is the call graph for this function:

Member Data Documentation

◆ askfaceFaceQueueListener

final FaceQueueListener com.realtime.crossfire.jxclient.faces.FacesQueue.askfaceFaceQueueListener
private
Initial value:
= new FaceQueueListener() {
@Override
public void faceLoaded(@NotNull final Face face, @NotNull final FaceImages faceImages) {
fireFaceLoaded(face, faceImages);
fileCacheFaceQueue.saveFace(face, faceImages);
}
@Override
public void faceFailed(@NotNull final Face face) {
}
}

The FaceQueueListener attached to faceQueue.

Definition at line 72 of file FacesQueue.java.

Referenced by com.realtime.crossfire.jxclient.faces.FacesQueue.FacesQueue().

◆ faceQueue

final FaceQueue com.realtime.crossfire.jxclient.faces.FacesQueue.faceQueue
private

The FaceQueue instance used to query faces from the Crossfire server.

Definition at line 46 of file FacesQueue.java.

Referenced by com.realtime.crossfire.jxclient.faces.FacesQueue.FacesQueue(), and com.realtime.crossfire.jxclient.faces.FacesQueue.reset().

◆ fileCacheFaceQueue

final FileCacheFaceQueue com.realtime.crossfire.jxclient.faces.FacesQueue.fileCacheFaceQueue
private

◆ fileCacheFaceQueueListener

final FaceQueueListener com.realtime.crossfire.jxclient.faces.FacesQueue.fileCacheFaceQueueListener
private
Initial value:
= new FaceQueueListener() {
@Override
public void faceLoaded(@NotNull final Face face, @NotNull final FaceImages faceImages) {
fireFaceLoaded(face, faceImages);
}
@Override
public void faceFailed(@NotNull final Face face) {
}
}

The FaceQueueListener attached to fileCacheFaceQueue.

Definition at line 53 of file FacesQueue.java.

Referenced by com.realtime.crossfire.jxclient.faces.FacesQueue.FacesQueue().


The documentation for this class was generated from the following file: