Crossfire JXClient, Trunk
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
com.realtime.crossfire.jxclient.faces.AskfaceFaceQueue Class Reference
Inheritance diagram for com.realtime.crossfire.jxclient.faces.AskfaceFaceQueue:
Inheritance graph
Collaboration diagram for com.realtime.crossfire.jxclient.faces.AskfaceFaceQueue:
Collaboration graph

Public Member Functions

 AskfaceFaceQueue (@NotNull final AskfaceQueue askfaceQueue)
 
void loadFace (@NotNull final Face face)
 
void reset ()
 
- Public Member Functions inherited from com.realtime.crossfire.jxclient.faces.AbstractFaceQueue
void addFaceQueueListener (@NotNull final FaceQueueListener faceQueueListener)
 
void removeFaceQueueListener (@NotNull final FaceQueueListener faceQueueListener)
 

Private Member Functions

void faceReceived (final int faceNum, final int faceSetNum, final byte @NotNull[] data)
 
void processFaceData (@NotNull final Face face, final byte @NotNull[] data)
 
void sendAskface ()
 

Private Attributes

final AskfaceQueue askfaceQueue
 
final Map< Integer, FacependingAskfaces = new HashMap<>()
 
final Map< Integer, FacependingFaces = new HashMap<>()
 
final List< FacependingFacesQueue = new LinkedList<>()
 
final Object sync = new Object()
 

Static Private Attributes

static final int CONCURRENT_ASKFACE_COMMANDS = 8
 

Additional Inherited Members

- Protected Member Functions inherited from com.realtime.crossfire.jxclient.faces.AbstractFaceQueue
void fireFaceFailed (@NotNull final Face face)
 
void fireFaceLoaded (@NotNull final Face face, @NotNull final FaceImages faceImages)
 

Detailed Description

A FaceQueue requesting faces by "askface" commands sent to the Crossfire server.

Author
Andreas Kirschbaum

Definition at line 37 of file AskfaceFaceQueue.java.

Constructor & Destructor Documentation

◆ AskfaceFaceQueue()

com.realtime.crossfire.jxclient.faces.AskfaceFaceQueue.AskfaceFaceQueue ( @NotNull final AskfaceQueue  askfaceQueue)

Creates a new instance.

Parameters
askfaceQueuethe connection instance for sending askface commands

Definition at line 83 of file AskfaceFaceQueue.java.

References com.realtime.crossfire.jxclient.faces.AskfaceQueue.addFaceReceivedListener(), and com.realtime.crossfire.jxclient.faces.AskfaceFaceQueue.askfaceQueue.

Here is the call graph for this function:

Member Function Documentation

◆ faceReceived()

void com.realtime.crossfire.jxclient.faces.AskfaceFaceQueue.faceReceived ( final int  faceNum,
final int  faceSetNum,
final byte @NotNull[]  data 
)
private

◆ loadFace()

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

◆ processFaceData()

void com.realtime.crossfire.jxclient.faces.AskfaceFaceQueue.processFaceData ( @NotNull final Face  face,
final byte @NotNull[]  data 
)
private

Processes face information received from the server.

Parameters
facethe face
datathe face information; it is supposed to be a .png file

Definition at line 167 of file AskfaceFaceQueue.java.

References com.realtime.crossfire.jxclient.faces.AbstractFaceQueue.fireFaceFailed(), com.realtime.crossfire.jxclient.faces.AbstractFaceQueue.fireFaceLoaded(), and com.realtime.crossfire.jxclient.faces.FaceImagesUtils.newFaceImages().

Referenced by com.realtime.crossfire.jxclient.faces.AskfaceFaceQueue.faceReceived().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset()

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

◆ sendAskface()

void com.realtime.crossfire.jxclient.faces.AskfaceFaceQueue.sendAskface ( )
private

Member Data Documentation

◆ askfaceQueue

final AskfaceQueue com.realtime.crossfire.jxclient.faces.AskfaceFaceQueue.askfaceQueue
private

◆ CONCURRENT_ASKFACE_COMMANDS

final int com.realtime.crossfire.jxclient.faces.AskfaceFaceQueue.CONCURRENT_ASKFACE_COMMANDS = 8
staticprivate

The maximum number of concurrently sent "askface" commands. If more are requested, the excess ones are put on hold until some face information is received.

Definition at line 44 of file AskfaceFaceQueue.java.

Referenced by com.realtime.crossfire.jxclient.faces.AskfaceFaceQueue.sendAskface().

◆ pendingAskfaces

final Map<Integer, Face> com.realtime.crossfire.jxclient.faces.AskfaceFaceQueue.pendingAskfaces = new HashMap<>()
private

Face numbers for which "askface" commands have been sent without having received a response from the server. Maps face ID to Face instance.

Definition at line 64 of file AskfaceFaceQueue.java.

Referenced by com.realtime.crossfire.jxclient.faces.AskfaceFaceQueue.faceReceived(), com.realtime.crossfire.jxclient.faces.AskfaceFaceQueue.reset(), and com.realtime.crossfire.jxclient.faces.AskfaceFaceQueue.sendAskface().

◆ pendingFaces

final Map<Integer, Face> com.realtime.crossfire.jxclient.faces.AskfaceFaceQueue.pendingFaces = new HashMap<>()
private

◆ pendingFacesQueue

final List<Face> com.realtime.crossfire.jxclient.faces.AskfaceFaceQueue.pendingFacesQueue = new LinkedList<>()
private

◆ sync

final Object com.realtime.crossfire.jxclient.faces.AskfaceFaceQueue.sync = new Object()
private

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