messageServerP
Interface HumanInterface

All Known Implementing Classes:
TextualInterfaceIt

public interface HumanInterface

The interface for a human administrator, containing all the methods to show messages, warnings or problems and receive commands.

Author:
Marco Cornolti

Method Summary
 void destroy()
          Destroys the interface.
 Command getCommand()
           
 void initialize()
          Initializes the interface.
 void showAddAlreadyInserted(java.lang.String user, java.lang.String userToAdd)
          Called when a user tried to add to its friend list another user that is already present.
 void showAddToFriendDone(java.lang.String user, java.lang.String userToAdd)
          Called when a user successfullt added a user to its friend list.
 void showAddToFriendRequest(java.lang.String user, java.lang.String userToAdd)
          Called when a user requested to add a user to its friend list.
 void showAdminDeletionDone(java.lang.String nick)
          Called when a user deletion by the administrator has been done.
 void showAdminDeletionRequest(java.lang.String nick)
          Called when a user deletion by the administrator has been requested.
 void showAdminWrongPassword()
          Called when a wrong administration password has been used to access some service.
 void showAssignationBlocked()
          Called when the user assignation to this message server has been blocked.
 void showAssignationDone(java.lang.String nick)
          Called when a new user assignation has been done.
 void showAssignationRequest(java.lang.String nick)
          Called when a new user assignation has been requested.
 void showAssignationUnblocked()
          Called when the user assignation to this message server has been unblocked.
 void showAssignMovedDone(java.lang.String nick)
          Called when a moved user assignation has been done.
 void showAssignMovedRequest(java.lang.String nick)
          Called when a moved user assignation has been requested.
 void showBackupDone()
          Called when a backup procedure has been done.
 void showBackupFailed()
          Called when a backup procedure failed.
 void showBackupFileStart(java.lang.String filename)
          Called when a backup over a file started.
 void showBackupStart()
          Called when a backup procedure starts.
 void showBlockContactDone(java.lang.String nick, java.lang.String nick2)
          Called when a user successfully added a nickname to its blocking contact list.
 void showBlockContactRequest(java.lang.String nick, java.lang.String nick2)
          Called when a user requested to add a nickname to its blocking contact list.
 void showChangePasswordDone(java.lang.String nick)
          Called when a user successfully changed its password.
 void showChangePasswordRequest(java.lang.String nick)
          Called when a user requests to change its password.
 void showContactListDone(java.lang.String user)
          Called when a user successfully obtained its contact list.
 void showContactListRequest(java.lang.String user)
          Called when a user requests its contact list.
 void showCouldNotBackupUser(java.lang.String nickname)
          Called when a backup for a user failed.
 void showCouldNotRemoveBackuppedUser(java.lang.String nick)
          Called when a user removal from the backup failed.
 void showDeleteDownloadedDone(java.lang.String nick)
          Called when a user successfully deleted its downloaded message queue.
 void showDeleteDownloadedRequest(java.lang.String nick)
          Called when a user requested to delete its downloaded message queue.
 void showDeleteUserDone(java.lang.String nick)
          Called when a user deletion is done.
 void showDeleteUserRequest(java.lang.String nick)
          Called when a user deletion is requested.
 void showDownloadDone(java.lang.String nick)
          Called when a user successfully downloaded its message queue.
 void showDownloadRequest(java.lang.String nick)
          Called when a user requests to download its message queue.
 void showForwardCacheDone(java.lang.String from, java.lang.String to, int length)
          Called when a message forwarding has been sent throught the cache.
 void showForwardDone(java.lang.String from, java.lang.String to, int length)
          Called when a message forwarding has been done and the user is managed by a remote message server.
 void showForwardLocalDone(java.lang.String from, java.lang.String to, int length)
          Called when a message forwarding has been done and the user is locally managed.
 void showForwardNotAllowed(java.lang.String from, java.lang.String to, int length)
          Called when a message forwarding was not allowed by the recipient message server.
 void showForwardRequest(java.lang.String from, java.lang.String to, int length)
          Called when a message forwarding has been requested.
 void showGetContactCache(java.lang.String nick)
          Called when a user's direct contact request has been forwarded by the cache.
 void showGetContactDone(java.lang.String nick)
          Called when somebody successfully obtained a user's direct contact.
 void showGetContactRequest(java.lang.String nick)
          Called when somebody asked a user's direct contact.
 void showGetManagedContactDone(java.lang.String nick)
          Called when the direct contact of a user that is locally managed has been successfully sent.
 void showGetManagedContactRequest(java.lang.String nick)
          Called when the direct contact of a user that is locally managed has been requested.
 void showGetManagedContactUserNotManaged(java.lang.String nick)
          Called when the direct contact of a user that is locally managed failed because the user is not locally managed.
 void showInListOfUserContainsDone(java.lang.String listNick, java.lang.String nick2, boolean contains)
          Called when somebody asked if a user (listNick) accepts messages by another user (nick2) and the request was done.
 void showInListOfUserContainsRequest(java.lang.String listNick, java.lang.String nick2)
          Called when somebody asked if a user (listNick) accepts messages by another user (nick2).
 void showLoadStats(Statistics currentStats, java.lang.String bsHostName, int bsRmiPort, int bsUdpPort)
          Shows the load statistics.
 void showMoveDone(java.lang.String nick, java.lang.String messageServer)
          Called when a user moving to this message server has been done.
 void showMoveRequest(java.lang.String nick, java.lang.String messageServer)
          Called when a user moving to this message server has been requested.
 void showRemoveContactDone(java.lang.String nick, java.lang.String nick2)
          Called when a contact has successfully been removed by a contact list.
 void showRemoveContactRequest(java.lang.String nick, java.lang.String nick2)
          Called when a user requested to remove a contact from its contact list.
 void showSendLoad(java.lang.String sendingData)
          Called when a load data has been sent.
 void showSendLoadTransferProblem()
          Called when some problem occurred while trying to send load data.
 void showSetStatusDone(java.lang.String nick, boolean state)
          Called when user successfully changed its status.
 void showSetStatusRequest(java.lang.String nick, boolean state)
          Called when a user requests to change its status.
 void showShutdownDone()
          Called when a shutdown request has been accepted.
 void showShutDownFailedUsers()
          Called when a shutdown request failed because of the presence of currently managed users that must be moved to some other server.
 void showShutdownRequest()
          Called when a shutdown has been requested.
 void showStatsRequest()
          Called when the statistics of this MS has been requested.
 void showSystemError(User user)
          Called when a gossip system error occured and a user exists but is not assigned to any server.
 void showTestPortsDone(int port, java.lang.String hostAddress)
          Called when a port test was successful.
 void showTestPortsFailed(int port, java.lang.String hostAddress)
          Called when a port test failed.
 void showTestPortsRequest(int port, java.lang.String hostAddress)
          Called when a port test has been requested.
 void showTestPresence()
          Called when a presence test to this message server has been done.
 void showUDPSocketProblem()
          Called when a UDP Socked problem occurred while sending load data.
 void showUserBlocked(java.lang.String nick)
          Called when a user got blocked.
 void showUsersListDone()
          Called when the list of users managed by this message server has been done.
 void showUsersListRequest()
          Called when the list of users managed by this message server has been requested.
 void showUsersStats(int managedUsers, int onlineManagedUsers, ManagedUser[] users)
          Shows the user statistics.
 void showWrongUser(java.lang.String nick)
          Called when a request for a user that is not managed by this message server is done.
 void showWrongUserPassword(java.lang.String nick)
          Called when a request with a wrong password for a user is done.
 

Method Detail

getCommand

Command getCommand()
Returns:
the command got from the interface.

initialize

void initialize()
Initializes the interface.


destroy

void destroy()
Destroys the interface.


showTestPresence

void showTestPresence()
Called when a presence test to this message server has been done.


showAdminDeletionRequest

void showAdminDeletionRequest(java.lang.String nick)
Called when a user deletion by the administrator has been requested.

Parameters:
nick - the user nickname

showAdminDeletionDone

void showAdminDeletionDone(java.lang.String nick)
Called when a user deletion by the administrator has been done.

Parameters:
nick - the user nickname

showMoveRequest

void showMoveRequest(java.lang.String nick,
                     java.lang.String messageServer)
Called when a user moving to this message server has been requested.

Parameters:
nick - the user nickname.
messageServer - the message server hostnae.

showMoveDone

void showMoveDone(java.lang.String nick,
                  java.lang.String messageServer)
Called when a user moving to this message server has been done.

Parameters:
nick - the user nickname.
messageServer - the message server hostnae.

showStatsRequest

void showStatsRequest()
Called when the statistics of this MS has been requested.


showAssignationRequest

void showAssignationRequest(java.lang.String nick)
Called when a new user assignation has been requested.

Parameters:
nick - the user nickname.

showAssignationDone

void showAssignationDone(java.lang.String nick)
Called when a new user assignation has been done.

Parameters:
nick - the user nickname.

showUsersListRequest

void showUsersListRequest()
Called when the list of users managed by this message server has been requested.


showUsersListDone

void showUsersListDone()
Called when the list of users managed by this message server has been done.


showAddToFriendRequest

void showAddToFriendRequest(java.lang.String user,
                            java.lang.String userToAdd)
Called when a user requested to add a user to its friend list.

Parameters:
user - the calling user nickname.
userToAdd - the user to add nickname.

showAddToFriendDone

void showAddToFriendDone(java.lang.String user,
                         java.lang.String userToAdd)
Called when a user successfullt added a user to its friend list.

Parameters:
user - the calling user nickname.
userToAdd - the user to add nickname.

showDownloadRequest

void showDownloadRequest(java.lang.String nick)
Called when a user requests to download its message queue.

Parameters:
nick - the user nickname.

showDownloadDone

void showDownloadDone(java.lang.String nick)
Called when a user successfully downloaded its message queue.

Parameters:
nick - the user nickname.

showSetStatusRequest

void showSetStatusRequest(java.lang.String nick,
                          boolean state)
Called when a user requests to change its status.

Parameters:
nick - the user nickname.
state - true if the new status is on-line, false if the new status is off-line.

showSetStatusDone

void showSetStatusDone(java.lang.String nick,
                       boolean state)
Called when user successfully changed its status.

Parameters:
nick - the user nickname.
state - true if the new status is on-line, false if the new status is off-line.

showForwardRequest

void showForwardRequest(java.lang.String from,
                        java.lang.String to,
                        int length)
Called when a message forwarding has been requested.

Parameters:
from - the sender of the message.
to - the recipient of the message.
length - the message length.

showForwardLocalDone

void showForwardLocalDone(java.lang.String from,
                          java.lang.String to,
                          int length)
Called when a message forwarding has been done and the user is locally managed.

Parameters:
from - the sender of the message.
to - the recipient of the message.
length - the message length.

showForwardCacheDone

void showForwardCacheDone(java.lang.String from,
                          java.lang.String to,
                          int length)
Called when a message forwarding has been sent throught the cache.

Parameters:
from - the sender of the message.
to - the recipient of the message.
length - the message length.

showForwardNotAllowed

void showForwardNotAllowed(java.lang.String from,
                           java.lang.String to,
                           int length)
Called when a message forwarding was not allowed by the recipient message server.

Parameters:
from - the sender of the message.
to - the recipient of the message.
length - the message length.

showForwardDone

void showForwardDone(java.lang.String from,
                     java.lang.String to,
                     int length)
Called when a message forwarding has been done and the user is managed by a remote message server.

Parameters:
from - the sender of the message.
to - the recipient of the message.
length - the message length.

showContactListDone

void showContactListDone(java.lang.String user)
Called when a user successfully obtained its contact list.

Parameters:
user - the user nickname.

showContactListRequest

void showContactListRequest(java.lang.String user)
Called when a user requests its contact list.

Parameters:
user - the user nickname.

showChangePasswordDone

void showChangePasswordDone(java.lang.String nick)
Called when a user successfully changed its password.

Parameters:
nick - the user nickname.

showChangePasswordRequest

void showChangePasswordRequest(java.lang.String nick)
Called when a user requests to change its password.

Parameters:
nick - the user nickname.

showDeleteUserRequest

void showDeleteUserRequest(java.lang.String nick)
Called when a user deletion is requested.

Parameters:
nick - the user nickname.

showDeleteUserDone

void showDeleteUserDone(java.lang.String nick)
Called when a user deletion is done.

Parameters:
nick - the user nickname.

showTestPortsRequest

void showTestPortsRequest(int port,
                          java.lang.String hostAddress)
Called when a port test has been requested.

Parameters:
port - the port to test.
hostAddress - the host address.

showTestPortsFailed

void showTestPortsFailed(int port,
                         java.lang.String hostAddress)
Called when a port test failed.

Parameters:
port - the tested port.
hostAddress - the tested host address.

showTestPortsDone

void showTestPortsDone(int port,
                       java.lang.String hostAddress)
Called when a port test was successful.

Parameters:
port - the tested port.
hostAddress - the tested host address.

showInListOfUserContainsRequest

void showInListOfUserContainsRequest(java.lang.String listNick,
                                     java.lang.String nick2)
Called when somebody asked if a user (listNick) accepts messages by another user (nick2).

Parameters:
listNick - the user whose incoming list must be checked.
nick2 - the user that must be checked.

showInListOfUserContainsDone

void showInListOfUserContainsDone(java.lang.String listNick,
                                  java.lang.String nick2,
                                  boolean contains)
Called when somebody asked if a user (listNick) accepts messages by another user (nick2) and the request was done.

Parameters:
listNick - the user whose incoming list has been checked.
nick2 - the user that has been checked.
contains - true if listNick accepts messages by nick2, false otherwise.

showAssignMovedRequest

void showAssignMovedRequest(java.lang.String nick)
Called when a moved user assignation has been requested.

Parameters:
nick - the moving user nickname.

showAssignMovedDone

void showAssignMovedDone(java.lang.String nick)
Called when a moved user assignation has been done.

Parameters:
nick - the moving user nickname.

showDeleteDownloadedRequest

void showDeleteDownloadedRequest(java.lang.String nick)
Called when a user requested to delete its downloaded message queue.

Parameters:
nick - the user nickname.

showDeleteDownloadedDone

void showDeleteDownloadedDone(java.lang.String nick)
Called when a user successfully deleted its downloaded message queue.

Parameters:
nick - the user nickname.

showSendLoad

void showSendLoad(java.lang.String sendingData)
Called when a load data has been sent.

Parameters:
sendingData - the sent data.

showUDPSocketProblem

void showUDPSocketProblem()
Called when a UDP Socked problem occurred while sending load data.


showSendLoadTransferProblem

void showSendLoadTransferProblem()
Called when some problem occurred while trying to send load data.


showShutDownFailedUsers

void showShutDownFailedUsers()
Called when a shutdown request failed because of the presence of currently managed users that must be moved to some other server.


showShutdownDone

void showShutdownDone()
Called when a shutdown request has been accepted.


showRemoveContactDone

void showRemoveContactDone(java.lang.String nick,
                           java.lang.String nick2)
Called when a contact has successfully been removed by a contact list.

Parameters:
nick - the contact list owner.
nick2 - the removed nickname.

showRemoveContactRequest

void showRemoveContactRequest(java.lang.String nick,
                              java.lang.String nick2)
Called when a user requested to remove a contact from its contact list.

Parameters:
nick - the contact list owner.
nick2 - the nickname to remove.

showBlockContactDone

void showBlockContactDone(java.lang.String nick,
                          java.lang.String nick2)
Called when a user successfully added a nickname to its blocking contact list.

Parameters:
nick - the blocking contact list owner.
nick2 - the blocked nickname.

showBlockContactRequest

void showBlockContactRequest(java.lang.String nick,
                             java.lang.String nick2)
Called when a user requested to add a nickname to its blocking contact list.

Parameters:
nick - the blocking contact list owner.
nick2 - the nickname of the user to block.

showGetContactDone

void showGetContactDone(java.lang.String nick)
Called when somebody successfully obtained a user's direct contact.

Parameters:
nick - the user whose direct contact had been requested.

showGetContactCache

void showGetContactCache(java.lang.String nick)
Called when a user's direct contact request has been forwarded by the cache.

Parameters:
nick - the user whose direct contact had been requested.

showGetContactRequest

void showGetContactRequest(java.lang.String nick)
Called when somebody asked a user's direct contact.

Parameters:
nick - the user whose direct contact had been requested.

showGetManagedContactDone

void showGetManagedContactDone(java.lang.String nick)
Called when the direct contact of a user that is locally managed has been successfully sent.

Parameters:
nick - the user nickname.

showGetManagedContactUserNotManaged

void showGetManagedContactUserNotManaged(java.lang.String nick)
Called when the direct contact of a user that is locally managed failed because the user is not locally managed.

Parameters:
nick - the user nickname.

showGetManagedContactRequest

void showGetManagedContactRequest(java.lang.String nick)
Called when the direct contact of a user that is locally managed has been requested.

Parameters:
nick - the user nickname.

showCouldNotBackupUser

void showCouldNotBackupUser(java.lang.String nickname)
Called when a backup for a user failed.

Parameters:
nickname - the user nickname.

showCouldNotRemoveBackuppedUser

void showCouldNotRemoveBackuppedUser(java.lang.String nick)
Called when a user removal from the backup failed.

Parameters:
nick - the user nickname

showBackupFileStart

void showBackupFileStart(java.lang.String filename)
Called when a backup over a file started.

Parameters:
filename - the file the backup is being writed to.

showBackupDone

void showBackupDone()
Called when a backup procedure has been done.


showBackupStart

void showBackupStart()
Called when a backup procedure starts.


showBackupFailed

void showBackupFailed()
Called when a backup procedure failed.


showUserBlocked

void showUserBlocked(java.lang.String nick)
Called when a user got blocked.

Parameters:
nick - the blocked user nickname.

showShutdownRequest

void showShutdownRequest()
Called when a shutdown has been requested.


showAssignationBlocked

void showAssignationBlocked()
Called when the user assignation to this message server has been blocked.


showAssignationUnblocked

void showAssignationUnblocked()
Called when the user assignation to this message server has been unblocked.


showAdminWrongPassword

void showAdminWrongPassword()
Called when a wrong administration password has been used to access some service.


showWrongUser

void showWrongUser(java.lang.String nick)
Called when a request for a user that is not managed by this message server is done.

Parameters:
nick - the user nickname

showWrongUserPassword

void showWrongUserPassword(java.lang.String nick)
Called when a request with a wrong password for a user is done.

Parameters:
nick - the user nickname

showAddAlreadyInserted

void showAddAlreadyInserted(java.lang.String user,
                            java.lang.String userToAdd)
Called when a user tried to add to its friend list another user that is already present.

Parameters:
user - the list owner.
userToAdd - the user to add.

showUsersStats

void showUsersStats(int managedUsers,
                    int onlineManagedUsers,
                    ManagedUser[] users)
Shows the user statistics.

Parameters:
managedUsers - the number of managed user
onlineManagedUsers - the number of online users
users - the formatted list of users and their status and direct contact.

showLoadStats

void showLoadStats(Statistics currentStats,
                   java.lang.String bsHostName,
                   int bsRmiPort,
                   int bsUdpPort)
Shows the load statistics.

Parameters:
currentStats - the current Statistics object to print.
bsHostName - the bootstrap hostname.
bsRmiPort - the bootstrap rmi port.
bsUdpPort - the bootstrap udp port.

showSystemError

void showSystemError(User user)
Called when a gossip system error occured and a user exists but is not assigned to any server.

Parameters:
user - the user whose status is wrong.