JML

net.sf.jml.message.p2p
Class DisplayPictureDuelManager

java.lang.Object
  extended by net.sf.jml.message.p2p.DisplayPictureDuelManager

public class DisplayPictureDuelManager
extends Object

This class is the manager for all MsnObjects P2P transmisions from this client to a remote one.

Author:
Angel Barragán Chacón

Constructor Summary
DisplayPictureDuelManager()
          Create a new instance of the duel manager.
 
Method Summary
 void add(DisplayPictureDuel duel)
          Add a new instance of a DisplayPictureDuel to the list of workers.
 DisplayPictureDuel get(int baseId)
          Get an instance of a DisplayPictureDuel worker based on it's ID.
 MsnObject getDisplayPicture()
          Retrieves the current user display picture.
 MsnObject getPicture(String key)
          Get a picture based on it's key.
 int getSize()
          Get the number of actual workers.
 void putPicture(String key, MsnObject obj)
          Add a new picture to be available to be sended when required.
 boolean remove(int baseId)
          Removes a DisplayPictureDuel based on the worker id.
 void setDisplayPicutre(MsnObject displayPicture)
          Sets the current user display picture.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DisplayPictureDuelManager

public DisplayPictureDuelManager()
Create a new instance of the duel manager.

Method Detail

add

public void add(DisplayPictureDuel duel)
Add a new instance of a DisplayPictureDuel to the list of workers.

Parameters:
duel - Instance of the worker.

get

public DisplayPictureDuel get(int baseId)
Get an instance of a DisplayPictureDuel worker based on it's ID.

Parameters:
baseId - Id of the worker.
Returns:
instance of the worker.

remove

public boolean remove(int baseId)
Removes a DisplayPictureDuel based on the worker id.

Parameters:
baseId - Id of the worker.
Returns:
True if it was removed and false if not.

getSize

public int getSize()
Get the number of actual workers.

Returns:
Number of actual workers.

putPicture

public void putPicture(String key,
                       MsnObject obj)
Add a new picture to be available to be sended when required.

Parameters:
key - Key for the picture.
obj - Instance of the MsnObject.

getPicture

public MsnObject getPicture(String key)
Get a picture based on it's key.

Parameters:
key - Key of the picture.
Returns:
Instance of the picture.

getDisplayPicture

public MsnObject getDisplayPicture()
Retrieves the current user display picture.

Returns:
Instance of the current user display pìcture.

setDisplayPicutre

public void setDisplayPicutre(MsnObject displayPicture)
Sets the current user display picture.

Parameters:
displayPicture - Instance of the current user display picture.

JML