|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectmessageServerP.TextualInterfaceIt
public class TextualInterfaceIt
A textual interface in italian.
| Field Summary | |
|---|---|
(package private) static java.io.BufferedReader |
in
|
(package private) static java.io.PrintStream |
out
|
| Constructor Summary | |
|---|---|
TextualInterfaceIt()
|
|
| Method Summary | |
|---|---|
void |
destroy()
Destroys the interface. |
Command |
getCommand()
|
void |
initialize()
Initializes the interface. |
private void |
printError(java.lang.String err)
Stampa i messaggi di gravi errori di sistema locali. |
private void |
printHelp()
Stampa l'elenco dei comandi e la loro sintassi. |
private void |
printMessage(java.lang.String msg)
Stampa i messaggi di normale interazione. |
private void |
printWarning(java.lang.String war)
Stampa i messaggi di particolare rilevanza come errori degli utenti, errori del sistema globale e password sbagliate. |
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 |
showAddToOutDone(java.lang.String user,
java.lang.String userToAdd)
|
void |
showAddToOutNotAllowed(java.lang.String user,
java.lang.String userToAdd)
|
void |
showAddToOutRequest(java.lang.String user,
java.lang.String userToAdd)
|
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 |
showBlockContactFailedNotExists(java.lang.String nick,
java.lang.String nick2)
|
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 bsHost,
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. |
private void |
showWrongCommandName()
|
private void |
showWrongParametersNumber()
|
void |
showWrongUser(java.lang.String user)
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static java.io.BufferedReader in
static java.io.PrintStream out
| Constructor Detail |
|---|
public TextualInterfaceIt()
| Method Detail |
|---|
public void initialize()
HumanInterface
initialize in interface HumanInterfacepublic Command getCommand()
getCommand in interface HumanInterfaceprivate void showWrongCommandName()
private void showWrongParametersNumber()
private void printHelp()
public void showAddAlreadyInserted(java.lang.String user,
java.lang.String userToAdd)
HumanInterface
showAddAlreadyInserted in interface HumanInterfaceuser - the list owner.userToAdd - the user to add.
public void showAddToFriendDone(java.lang.String user,
java.lang.String userToAdd)
HumanInterface
showAddToFriendDone in interface HumanInterfaceuser - the calling user nickname.userToAdd - the user to add nickname.
public void showAddToFriendRequest(java.lang.String user,
java.lang.String userToAdd)
HumanInterface
showAddToFriendRequest in interface HumanInterfaceuser - the calling user nickname.userToAdd - the user to add nickname.
public void showAddToOutDone(java.lang.String user,
java.lang.String userToAdd)
public void showAddToOutNotAllowed(java.lang.String user,
java.lang.String userToAdd)
public void showAddToOutRequest(java.lang.String user,
java.lang.String userToAdd)
public void showAdminDeletionDone(java.lang.String nick)
HumanInterface
showAdminDeletionDone in interface HumanInterfacenick - the user nicknamepublic void showAdminDeletionRequest(java.lang.String nick)
HumanInterface
showAdminDeletionRequest in interface HumanInterfacenick - the user nicknamepublic void showAdminWrongPassword()
HumanInterface
showAdminWrongPassword in interface HumanInterfacepublic void showAssignMovedDone(java.lang.String nick)
HumanInterface
showAssignMovedDone in interface HumanInterfacenick - the moving user nickname.public void showAssignMovedRequest(java.lang.String nick)
HumanInterface
showAssignMovedRequest in interface HumanInterfacenick - the moving user nickname.public void showAssignationBlocked()
HumanInterface
showAssignationBlocked in interface HumanInterfacepublic void showAssignationUnblocked()
HumanInterface
showAssignationUnblocked in interface HumanInterfacepublic void showAssignationDone(java.lang.String nick)
HumanInterface
showAssignationDone in interface HumanInterfacenick - the user nickname.public void showAssignationRequest(java.lang.String nick)
HumanInterface
showAssignationRequest in interface HumanInterfacenick - the user nickname.public void showChangePasswordDone(java.lang.String nick)
HumanInterface
showChangePasswordDone in interface HumanInterfacenick - the user nickname.public void showChangePasswordRequest(java.lang.String nick)
HumanInterface
showChangePasswordRequest in interface HumanInterfacenick - the user nickname.public void showContactListDone(java.lang.String user)
HumanInterface
showContactListDone in interface HumanInterfaceuser - the user nickname.public void showContactListRequest(java.lang.String user)
HumanInterface
showContactListRequest in interface HumanInterfaceuser - the user nickname.public void showDeleteDownloadedDone(java.lang.String nick)
HumanInterface
showDeleteDownloadedDone in interface HumanInterfacenick - the user nickname.public void showDeleteDownloadedRequest(java.lang.String nick)
HumanInterface
showDeleteDownloadedRequest in interface HumanInterfacenick - the user nickname.public void showDeleteUserDone(java.lang.String nick)
HumanInterface
showDeleteUserDone in interface HumanInterfacenick - the user nickname.public void showDeleteUserRequest(java.lang.String nick)
HumanInterface
showDeleteUserRequest in interface HumanInterfacenick - the user nickname.public void showDownloadDone(java.lang.String nick)
HumanInterface
showDownloadDone in interface HumanInterfacenick - the user nickname.public void showDownloadRequest(java.lang.String nick)
HumanInterface
showDownloadRequest in interface HumanInterfacenick - the user nickname.
public void showForwardCacheDone(java.lang.String from,
java.lang.String to,
int length)
HumanInterface
showForwardCacheDone in interface HumanInterfacefrom - the sender of the message.to - the recipient of the message.length - the message length.
public void showForwardDone(java.lang.String from,
java.lang.String to,
int length)
HumanInterface
showForwardDone in interface HumanInterfacefrom - the sender of the message.to - the recipient of the message.length - the message length.
public void showForwardLocalDone(java.lang.String from,
java.lang.String to,
int length)
HumanInterface
showForwardLocalDone in interface HumanInterfacefrom - the sender of the message.to - the recipient of the message.length - the message length.
public void showForwardNotAllowed(java.lang.String from,
java.lang.String to,
int length)
HumanInterface
showForwardNotAllowed in interface HumanInterfacefrom - the sender of the message.to - the recipient of the message.length - the message length.
public void showForwardRequest(java.lang.String from,
java.lang.String to,
int length)
HumanInterface
showForwardRequest in interface HumanInterfacefrom - the sender of the message.to - the recipient of the message.length - the message length.
public void showInListOfUserContainsDone(java.lang.String listNick,
java.lang.String nick2,
boolean contains)
HumanInterface
showInListOfUserContainsDone in interface HumanInterfacelistNick - 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.
public void showInListOfUserContainsRequest(java.lang.String listNick,
java.lang.String nick2)
HumanInterface
showInListOfUserContainsRequest in interface HumanInterfacelistNick - the user whose incoming list must be checked.nick2 - the user that must be checked.
public void showMoveDone(java.lang.String nick,
java.lang.String messageServer)
HumanInterface
showMoveDone in interface HumanInterfacenick - the user nickname.messageServer - the message server hostnae.
public void showMoveRequest(java.lang.String nick,
java.lang.String messageServer)
HumanInterface
showMoveRequest in interface HumanInterfacenick - the user nickname.messageServer - the message server hostnae.public void showSendLoad(java.lang.String sendingData)
HumanInterface
showSendLoad in interface HumanInterfacesendingData - the sent data.public void showSendLoadTransferProblem()
HumanInterface
showSendLoadTransferProblem in interface HumanInterface
public void showSetStatusDone(java.lang.String nick,
boolean state)
HumanInterface
showSetStatusDone in interface HumanInterfacenick - the user nickname.state - true if the new status is on-line, false if the new status is off-line.
public void showSetStatusRequest(java.lang.String nick,
boolean state)
HumanInterface
showSetStatusRequest in interface HumanInterfacenick - the user nickname.state - true if the new status is on-line, false if the new status is off-line.public void showStatsRequest()
HumanInterface
showStatsRequest in interface HumanInterface
public void showTestPortsDone(int port,
java.lang.String hostAddress)
HumanInterface
showTestPortsDone in interface HumanInterfaceport - the tested port.hostAddress - the tested host address.
public void showTestPortsFailed(int port,
java.lang.String hostAddress)
HumanInterface
showTestPortsFailed in interface HumanInterfaceport - the tested port.hostAddress - the tested host address.
public void showTestPortsRequest(int port,
java.lang.String hostAddress)
HumanInterface
showTestPortsRequest in interface HumanInterfaceport - the port to test.hostAddress - the host address.public void showTestPresence()
HumanInterface
showTestPresence in interface HumanInterfacepublic void showUDPSocketProblem()
HumanInterface
showUDPSocketProblem in interface HumanInterfacepublic void showUserBlocked(java.lang.String nick)
HumanInterface
showUserBlocked in interface HumanInterfacenick - the blocked user nickname.public void showUsersListDone()
HumanInterface
showUsersListDone in interface HumanInterfacepublic void showUsersListRequest()
HumanInterface
showUsersListRequest in interface HumanInterfacepublic void showWrongUser(java.lang.String user)
HumanInterface
showWrongUser in interface HumanInterfaceuser - the user nicknamepublic void showWrongUserPassword(java.lang.String nick)
HumanInterface
showWrongUserPassword in interface HumanInterfacenick - the user nicknamepublic void showShutDownFailedUsers()
HumanInterface
showShutDownFailedUsers in interface HumanInterfacepublic void showShutdownDone()
HumanInterface
showShutdownDone in interface HumanInterfacepublic void showShutdownRequest()
HumanInterface
showShutdownRequest in interface HumanInterface
public void showUsersStats(int managedUsers,
int onlineManagedUsers,
ManagedUser[] users)
HumanInterface
showUsersStats in interface HumanInterfacemanagedUsers - the number of managed useronlineManagedUsers - the number of online usersusers - the formatted list of users and their status and direct contact.
public void showLoadStats(Statistics currentStats,
java.lang.String bsHost,
int bsRmiPort,
int bsUdpPort)
HumanInterface
showLoadStats in interface HumanInterfacecurrentStats - the current Statistics object to print.bsHost - the bootstrap hostname.bsRmiPort - the bootstrap rmi port.bsUdpPort - the bootstrap udp port.private void printMessage(java.lang.String msg)
msg - il messaggio da stampare.private void printWarning(java.lang.String war)
war - il messaggio da stampare.private void printError(java.lang.String err)
err - il messaggio da stamparepublic void destroy()
HumanInterface
destroy in interface HumanInterface
public void showBlockContactDone(java.lang.String nick,
java.lang.String nick2)
HumanInterface
showBlockContactDone in interface HumanInterfacenick - the blocking contact list owner.nick2 - the blocked nickname.
public void showBlockContactFailedNotExists(java.lang.String nick,
java.lang.String nick2)
public void showBlockContactRequest(java.lang.String nick,
java.lang.String nick2)
HumanInterface
showBlockContactRequest in interface HumanInterfacenick - the blocking contact list owner.nick2 - the nickname of the user to block.
public void showRemoveContactDone(java.lang.String nick,
java.lang.String nick2)
HumanInterface
showRemoveContactDone in interface HumanInterfacenick - the contact list owner.nick2 - the removed nickname.
public void showRemoveContactRequest(java.lang.String nick,
java.lang.String nick2)
HumanInterface
showRemoveContactRequest in interface HumanInterfacenick - the contact list owner.nick2 - the nickname to remove.public void showSystemError(User user)
HumanInterface
showSystemError in interface HumanInterfaceuser - the user whose status is wrong.public void showGetContactCache(java.lang.String nick)
HumanInterface
showGetContactCache in interface HumanInterfacenick - the user whose direct contact had been requested.public void showGetContactDone(java.lang.String nick)
HumanInterface
showGetContactDone in interface HumanInterfacenick - the user whose direct contact had been requested.public void showGetContactRequest(java.lang.String nick)
HumanInterface
showGetContactRequest in interface HumanInterfacenick - the user whose direct contact had been requested.public void showGetManagedContactDone(java.lang.String nick)
HumanInterface
showGetManagedContactDone in interface HumanInterfacenick - the user nickname.public void showGetManagedContactRequest(java.lang.String nick)
HumanInterface
showGetManagedContactRequest in interface HumanInterfacenick - the user nickname.public void showGetManagedContactUserNotManaged(java.lang.String nick)
HumanInterface
showGetManagedContactUserNotManaged in interface HumanInterfacenick - the user nickname.public void showCouldNotBackupUser(java.lang.String nickname)
HumanInterface
showCouldNotBackupUser in interface HumanInterfacenickname - the user nickname.public void showCouldNotRemoveBackuppedUser(java.lang.String nick)
HumanInterface
showCouldNotRemoveBackuppedUser in interface HumanInterfacenick - the user nicknamepublic void showBackupDone()
HumanInterface
showBackupDone in interface HumanInterfacepublic void showBackupFileStart(java.lang.String filename)
HumanInterface
showBackupFileStart in interface HumanInterfacefilename - the file the backup is being writed to.public void showBackupStart()
HumanInterface
showBackupStart in interface HumanInterfacepublic void showBackupFailed()
HumanInterface
showBackupFailed in interface HumanInterface
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||