|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectbootstrapP.Command
public class Command
This class represents a command got from the human interface.
Field Summary | |
---|---|
private int |
int1
May be the unique MS id (for those commands involving only one MS like RemoveMS or UsersList) or the first MS id (for MoveUser) |
private int |
int2
The second MS id |
private java.lang.String |
str1
May be both an hostname or a nickname, depending on the command type |
private java.lang.String |
str2
The password |
private int |
type
The Command type |
Constructor Summary | |
---|---|
private |
Command(int type,
java.lang.String s1,
java.lang.String s2,
int i1,
int i2)
Private Command constructor. |
Method Summary | |
---|---|
java.lang.String |
getFilename()
Get the filename (for those method whose arguments has one). |
java.lang.String |
getHostname()
Get the hostname (for those method whose arguments has one). |
int |
getId1()
Get the first server ID number (for those method whose arguments has one). |
int |
getId2()
Get the second server ID number (for those method whose arguments has one). |
java.lang.String |
getNick()
Get the nickname (for those method whose arguments has one). |
java.lang.String |
getPassword()
Get the password (for those method whose arguments has one). |
int |
getRMIPort()
Get the RMI port (for those method whose arguments has one). |
int |
getUDPPort()
Get the UDP port (for those method whose arguments has one). |
boolean |
isAddMS()
The command is of type "add message server". |
boolean |
isBackup()
The command is of type "backup". |
boolean |
isBlockAssignation()
The command is of type "block assignation". |
boolean |
isDeleteUser()
The command is of type "delete user". |
boolean |
isMoveUser()
The command is of type "move a user to anothe message server". |
boolean |
isRemoveMS()
The command is of type "remove message server". |
boolean |
isShowAll()
The command is of type "show all". |
boolean |
isShowGlobalStats()
The command is of type "show global statistics". |
boolean |
isShutdown()
The command is of type "shutdown". |
boolean |
isTestPresence()
The command is of type "test presence". |
boolean |
isUnblockAssignation()
The command is of type "unblock assignation". |
boolean |
isUsersList()
The command is of type "list users". |
static Command |
makeAddMS(java.lang.String hostname,
java.lang.String password,
int rmiPort,
int udpPort)
"add message server" command constructor. |
static Command |
makeBackup(java.lang.String filename)
"backup" command constructor. |
static Command |
makeBlockAssignation(int id)
"block assignation" command constructor. |
static Command |
makeDeleteUser(java.lang.String nick)
"delete user" command constructor. |
static Command |
makeMoveUser(java.lang.String nick,
int id)
"move user" command constructor. |
static Command |
makeRemoveMS(int id)
"remove message server" command constructor. |
static Command |
makeShowAll()
"show all" command constructor. |
static Command |
makeShowGlobalStats()
"show global statitics" command constructor. |
static Command |
makeShutdown(int id)
"shutdown" command constructor. |
static Command |
makeTestPresence(int id)
"test presence" command constructor. |
static Command |
makeUnblockAssignation(int id)
"unblock assignation" command constructor. |
static Command |
makeUsersList(int id)
"show users list" command constructor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int type
private java.lang.String str1
private java.lang.String str2
private int int1
private int int2
Constructor Detail |
---|
private Command(int type, java.lang.String s1, java.lang.String s2, int i1, int i2)
type
- the command type.s1
- the hostname for commands of type AddMS, the nickname for commands of type DeleteUser or the file name (may be null) for the command Backup.s2
- the User passwordi1
- the MS id for commands of type RemoveMS or the first MS id for commands of type MoveUseri2
- the second MS idMethod Detail |
---|
public java.lang.String getHostname()
public java.lang.String getNick()
public java.lang.String getFilename()
public int getId1()
public int getId2()
public java.lang.String getPassword()
public int getUDPPort()
public int getRMIPort()
public boolean isShowAll()
public boolean isAddMS()
public boolean isDeleteUser()
public boolean isShowGlobalStats()
public boolean isRemoveMS()
public boolean isMoveUser()
public boolean isTestPresence()
public boolean isBlockAssignation()
public boolean isShutdown()
public boolean isUsersList()
public boolean isUnblockAssignation()
public boolean isBackup()
public static Command makeShowAll()
public static Command makeAddMS(java.lang.String hostname, java.lang.String password, int rmiPort, int udpPort)
hostname
- the hostname of the message server.password
- the ms password.rmiPort
- the ms RMI port.udpPort
- the ms UDP port.
public static Command makeDeleteUser(java.lang.String nick)
nick
- the user nickname.
public static Command makeShowGlobalStats()
public static Command makeRemoveMS(int id)
id
- the ms ID number.
public static Command makeMoveUser(java.lang.String nick, int id)
nick
- the nicknameid
- the id of the server the user must be moved to.
public static Command makeTestPresence(int id)
id
- the is of the message server whose presence must be tested.
public static Command makeBlockAssignation(int id)
id
- the ms that must be blocked.
public static Command makeShutdown(int id)
id
- the is of the ms that must me shut down.
public static Command makeUsersList(int id)
id
- the id of the ms the users must be shown.
public static Command makeUnblockAssignation(int id)
id
- the id of the server whose assignation must be unblocked.
public static Command makeBackup(java.lang.String filename)
filename
- the file name of the backup.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |