|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectbootstrapP.TextualInterfaceIt
public class TextualInterfaceIt
The human 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()
Called when the interface must be terminated. |
Command |
getCommand()
Gets the next command to execute from the interface. |
void |
initialize()
Initialize 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 disponibili. |
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 |
showBackupDone()
Called when the main backupper ends. |
void |
showBackupFailed()
Called when a backupper unit failed to backup. |
void |
showBackupFileStart(java.lang.String filename)
Called when a file backupper starts. |
void |
showBackupStart()
Called when a backupper unit starts. |
void |
showCouldNotBackupMS(java.lang.String hostname,
int RMIport,
int UDPport)
Called when a backup problem occurred and a MS could not be saved. |
void |
showCouldNotBackupUser(java.lang.String nickname)
Called when a backup problem occurred and a User could not be saved. |
void |
showCouldNotContactMS(java.lang.String hostname,
int udpPort,
int rmiPort)
Called when a Message Server could not be contacted. |
void |
showCouldNotRemoveBackuppedMS(java.lang.String hostName,
int RMIport,
int UDPport)
Called when a backup problem occurred and a MS could not be removed. |
void |
showCouldNotRemoveBackuppedUser(java.lang.String nick)
Called when a backup problem occurred and a User could not be removed. |
void |
showCouldNotShutdownUnblockedMS(int id1)
Called when a MS cannot shutdown because it is not blocked. |
void |
showGlobalMSStats(int mss,
long minFreeMem,
int minFreeMemI,
java.lang.String minMemCanonicalHostName,
long maxFreeMem,
int maxFreeMemI,
java.lang.String maxMemCanonicalHostName,
int minManUsers,
int minManUsersI,
java.lang.String minUsersCanonicalHostName,
int maxManUsers,
int maxManUsersI,
java.lang.String maxUsersCanonicalHostName,
long fwMsgs,
long onlineUsers,
long queuedMsgs)
Called when some global statistics must be shown. |
void |
showIllegalArgument(java.lang.String hostname,
int UDPport,
int RMIport)
Called when some given data are not right. |
void |
showMSAdded(java.lang.String canonicalHostName,
int udpPort,
int rmiPort)
Called when a MS is added. |
void |
showMSAlreadyInseted()
Called when the admin tried to add an already added message server. |
void |
showMSBlocked(int id1)
Called when a MS is blocked. |
void |
showMSCommunicationProblem(int id1)
Called when a communication problem with a MS occurred. |
void |
showMSGenericError(int msId)
Called when a generic error occurred in the message server. |
void |
showMSNotRemoved(int id1)
Called when a MS cannot be removed. |
void |
showMSRemoved(int id1)
Called when a MS has been removed. |
void |
showMSShutdownDone(int id1)
Called when a MS Shutdown is done correctly. |
void |
showMSShutdownFailedUsersPresent(int id)
Called when a MS cannot shutdown because some users are still assigned to it. |
void |
showMSUnblocked(int id1)
Called when a MS is not blocked. |
void |
showMSUnknown(java.lang.String hostAddress,
int port)
Called when an udp packet from an unknown Message server is received. |
void |
showMSUserNotAccepted(int id,
java.lang.String nick)
Called when a MS does not accept a user assignation. |
void |
showReceivedLoad(java.lang.String hostname,
int freeMem,
int fwdMess)
Called when a MS load is received. |
void |
showReceivedLoadFailed()
Called when a load could not be received. |
void |
showSingleMSStats(int i,
java.lang.String canonicalHostName,
int RMIport,
int UDPport,
int cacheEntries,
long freeMem,
long load,
int forwardedMessagesMinute,
int forwardedMessagesHour,
int forwardedMessages24Hours,
int forwardedMessages144Hours,
int managedUsers,
int onlineManagedUsers,
int queuedMessageNumber)
Called when a single server statistics must be shown. |
void |
showStatistics(long upTime,
int usersNumber,
int MSnumber)
Called when some statistics has to be shown. |
void |
showTestPresenceDone(int id1)
Called when a presence test for a MS is done correctly. |
void |
showTestPresenceFailed(int id1)
Called when a presence test for a MS failed. |
void |
showUDPProblem()
Called when an UDP problem occurred. |
void |
showUserDeleted(java.lang.String nick)
Called when a user was successfully deleted. |
void |
showUserList(int id1,
java.lang.String userStr)
Shows a list of users managed by a message server. |
void |
showUserMoved(java.lang.String nick)
Called when a user has been successfully moved. |
void |
showUserMoveSameDest(java.lang.String nick)
Called when somebody is trying to move a user from a server to its server. |
void |
showUserNotDeleted(java.lang.String nick)
Called when a user could not be deleted. |
void |
showUserNotExists(java.lang.String nick)
Called when a user does not exist. |
void |
showUserNotManaged(int managerMSi,
java.lang.String user)
Called when a user is not managed by a Message server. |
void |
showUserNotMoved(java.lang.String nick)
Called when a user could not be moved. |
private void |
showWrongCommandName()
Stampa un messaggio se il nome di un comando e' errato. |
void |
showWrongMSId(int id1)
Called when a MS id is not correct. |
void |
showWrongMSPassword(int id1)
Called when a Message server password is wrong. |
void |
showWrongMSPassword(java.lang.String host,
int udpPort,
int rmiPort)
Called when a Message server password is wrong. |
private void |
showWrongParametersFormat()
Stampa un messaggio se la sintassi di un comando non e' corretta. |
private void |
showWrongParametersNumber()
Stampa un messaggio se il numero di parametri immessi per un comando e' errata. |
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 HumanInterface
public Command getCommand()
HumanInterface
getCommand
in interface HumanInterface
private void showWrongCommandName()
private void showWrongParametersFormat()
private void showWrongParametersNumber()
private void printHelp()
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 showMSNotRemoved(int id1)
HumanInterface
showMSNotRemoved
in interface HumanInterface
id1
- the id of the MS that could not be removed.public void showMSRemoved(int id1)
HumanInterface
showMSRemoved
in interface HumanInterface
id1
- the id of the removed message server.public void showReceivedLoad(java.lang.String hostname, int freeMem, int fwdMess)
HumanInterface
showReceivedLoad
in interface HumanInterface
hostname
- the sender hostname.freeMem
- the free memory.fwdMess
- the forwarded messages.public void showUserDeleted(java.lang.String nick)
HumanInterface
showUserDeleted
in interface HumanInterface
nick
- the user nicknamepublic void showUserMoved(java.lang.String nick)
HumanInterface
showUserMoved
in interface HumanInterface
nick
- the user nickname.public void showUserNotDeleted(java.lang.String nick)
HumanInterface
showUserNotDeleted
in interface HumanInterface
nick
- the user nicknamepublic void showUserNotExists(java.lang.String nick)
HumanInterface
showUserNotExists
in interface HumanInterface
nick
- the user nicknamepublic void showUserNotMoved(java.lang.String nick)
HumanInterface
showUserNotMoved
in interface HumanInterface
nick
- the user nickname.public void showCouldNotContactMS(java.lang.String hostname, int udpPort, int rmiPort)
HumanInterface
showCouldNotContactMS
in interface HumanInterface
hostname
- the MS hostname.udpPort
- the MS UDP port.rmiPort
- the MS RMI port.public void showUDPProblem()
HumanInterface
showUDPProblem
in interface HumanInterface
public void showGlobalMSStats(int mss, long minFreeMem, int minFreeMemI, java.lang.String minMemCanonicalHostName, long maxFreeMem, int maxFreeMemI, java.lang.String maxMemCanonicalHostName, int minManUsers, int minManUsersI, java.lang.String minUsersCanonicalHostName, int maxManUsers, int maxManUsersI, java.lang.String maxUsersCanonicalHostName, long fwMsgs, long onlineUsers, long queuedMsgs)
HumanInterface
showGlobalMSStats
in interface HumanInterface
mss
- total number of Message Servers.minFreeMem
- the minimum free memory in a single server.minFreeMemI
- the id of the server with the minimum free memory.minMemCanonicalHostName
- the hostname of the server with the minimum free memory.maxFreeMem
- the maximum free memory in a single server.maxFreeMemI
- the id of the server with the maximum free memory.maxMemCanonicalHostName
- the hostname of the server with the maximum free memory.minManUsers
- the minimum managed users in a single server.minManUsersI
- the id of the server with the minimum managed users.minUsersCanonicalHostName
- the hostname of the server with the minimum managed users.maxManUsers
- the maximum managed users in a single server.maxManUsersI
- the id of the server with the maximum managed users.maxUsersCanonicalHostName
- the hostname of the server with the maximum managed users.fwMsgs
- the totally forwarded messages.onlineUsers
- the estimate online users.queuedMsgs
- the number of messages stored in the message servers queues.public void showSingleMSStats(int i, java.lang.String canonicalHostName, int RMIport, int UDPport, int cacheEntries, long freeMem, long load, int forwardedMessagesMinute, int forwardedMessagesHour, int forwardedMessages24Hours, int forwardedMessages144Hours, int managedUsers, int onlineManagedUsers, int queuedMessageNumber)
HumanInterface
showSingleMSStats
in interface HumanInterface
i
- the server id.canonicalHostName
- the server hostname.RMIport
- the server RMI port.UDPport
- the server UDP port.cacheEntries
- the cache entries.freeMem
- the free memory.load
- the load.forwardedMessagesMinute
- the number of messages forwarded in the last minute.forwardedMessagesHour
- the number of messages forwarded in the last hour.forwardedMessages24Hours
- the number of messages forwarded in the last day.forwardedMessages144Hours
- the number of messages forwarded in the last week.managedUsers
- the number of managed users.onlineManagedUsers
- the number of online managed users.queuedMessageNumber
- the number of queued messages.public void showStatistics(long upTime, int usersNumber, int MSnumber)
HumanInterface
showStatistics
in interface HumanInterface
upTime
- the local server uptime.usersNumber
- the number of currently registered users.MSnumber
- the number of registered message servers.public void showReceivedLoadFailed()
HumanInterface
showReceivedLoadFailed
in interface HumanInterface
public void showMSAdded(java.lang.String canonicalHostName, int udpPort, int rmiPort)
HumanInterface
showMSAdded
in interface HumanInterface
canonicalHostName
- the ms hostname.udpPort
- the UDP port.rmiPort
- the RMI port.public void showWrongMSPassword(java.lang.String host, int udpPort, int rmiPort)
HumanInterface
showWrongMSPassword
in interface HumanInterface
host
- the MS hostname.udpPort
- the MS UDP port.rmiPort
- the MS RMI port.public void showMSBlocked(int id1)
HumanInterface
showMSBlocked
in interface HumanInterface
id1
- the MS id.public void showCouldNotShutdownUnblockedMS(int id1)
HumanInterface
showCouldNotShutdownUnblockedMS
in interface HumanInterface
id1
- the ms id.public void showMSCommunicationProblem(int id1)
HumanInterface
showMSCommunicationProblem
in interface HumanInterface
id1
- the MS id.public void showMSShutdownDone(int id1)
HumanInterface
showMSShutdownDone
in interface HumanInterface
id1
- the MS idpublic void showTestPresenceDone(int id1)
HumanInterface
showTestPresenceDone
in interface HumanInterface
id1
- the MS idpublic void showTestPresenceFailed(int id1)
HumanInterface
showTestPresenceFailed
in interface HumanInterface
id1
- the MS idpublic void showUserList(int id1, java.lang.String userStr)
HumanInterface
showUserList
in interface HumanInterface
id1
- the ms id.userStr
- the users string representation.public void showWrongMSId(int id1)
HumanInterface
showWrongMSId
in interface HumanInterface
id1
- the wrong id.public void showWrongMSPassword(int id1)
HumanInterface
showWrongMSPassword
in interface HumanInterface
id1
- the MS id.public void showMSUnblocked(int id1)
HumanInterface
showMSUnblocked
in interface HumanInterface
id1
- the MS id.public void showMSUnknown(java.lang.String hostAddress, int port)
HumanInterface
showMSUnknown
in interface HumanInterface
hostAddress
- the sender hostname.port
- the sender UDP port.public void showUserNotManaged(int managerMSi, java.lang.String user)
HumanInterface
showUserNotManaged
in interface HumanInterface
managerMSi
- the MS id.user
- the user nickname.public void showMSGenericError(int msId)
HumanInterface
showMSGenericError
in interface HumanInterface
msId
- the message server ID.public void showMSShutdownFailedUsersPresent(int id)
HumanInterface
showMSShutdownFailedUsersPresent
in interface HumanInterface
id
- the ms id.public void showMSUserNotAccepted(int id, java.lang.String nick)
HumanInterface
showMSUserNotAccepted
in interface HumanInterface
id
- the MS id.nick
- the user nickname.public void showIllegalArgument(java.lang.String hostname, int UDPport, int RMIport)
HumanInterface
showIllegalArgument
in interface HumanInterface
hostname
- the given hostname.UDPport
- the given RMI port.RMIport
- the given UDP port.public void showCouldNotBackupMS(java.lang.String hostname, int RMIport, int UDPport)
HumanInterface
showCouldNotBackupMS
in interface HumanInterface
hostname
- the MS hostname.RMIport
- the MS RMI port.UDPport
- the Ms UDP port.public void showCouldNotBackupUser(java.lang.String nickname)
HumanInterface
showCouldNotBackupUser
in interface HumanInterface
nickname
- the user nickname.public void showCouldNotRemoveBackuppedMS(java.lang.String hostName, int RMIport, int UDPport)
HumanInterface
showCouldNotRemoveBackuppedMS
in interface HumanInterface
hostName
- the MS hostnameRMIport
- the MS RMI port.UDPport
- the MS UDP port.public void showCouldNotRemoveBackuppedUser(java.lang.String nick)
HumanInterface
showCouldNotRemoveBackuppedUser
in interface HumanInterface
nick
- the user nickname.public void showBackupDone()
HumanInterface
showBackupDone
in interface HumanInterface
public void showBackupFileStart(java.lang.String filename)
HumanInterface
showBackupFileStart
in interface HumanInterface
filename
- the name of the file the main backupper is working on.public void showBackupStart()
HumanInterface
showBackupStart
in interface HumanInterface
public void showBackupFailed()
HumanInterface
showBackupFailed
in interface HumanInterface
public void showUserMoveSameDest(java.lang.String nick)
HumanInterface
showUserMoveSameDest
in interface HumanInterface
nick
- the user nickname.public void showMSAlreadyInseted()
HumanInterface
showMSAlreadyInseted
in interface HumanInterface
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |