servlet
Class ControlStatus

java.lang.Object
  extended by servlet.ControlStatus

public class ControlStatus
extends java.lang.Object

This class checks if the users of the contacts list are on-line.

Author:
Alessandro Franchini

Field Summary
private  int finalsize
           
private  ContactList list
           
private  ContactList temp
           
private  User user
           
 
Constructor Summary
ControlStatus(ContactList cl, User user)
          The constructor
 
Method Summary
private  void addUser(User name)
          This method adds a user of the new list.
 ContactList getFinalList()
          Returns the final contacts list.
 User getUser()
          This method gets and removes the first user of the list.
 void setUser(User name)
          If the user is a friend, checks if he is online.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

temp

private ContactList temp

list

private ContactList list

user

private User user

finalsize

private int finalsize
Constructor Detail

ControlStatus

public ControlStatus(ContactList cl,
                     User user)
The constructor

Parameters:
cl - the contacts list
user - the user
Method Detail

getUser

public User getUser()
This method gets and removes the first user of the list.

Returns:
the first user of the list.

addUser

private void addUser(User name)
This method adds a user of the new list.

Parameters:
name -

setUser

public void setUser(User name)
If the user is a friend, checks if he is online. After the check, adds it at the new contacts list.

Parameters:
name - the user

getFinalList

public ContactList getFinalList()
Returns the final contacts list.

Returns:
the contacts list.