|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmud.client.corba.ServerConnection
public class ServerConnection
Create a new ORB and initialize and register the classes
Constructor Summary | |
---|---|
ServerConnection(java.lang.String[] args)
Create a new ServerConnection Instance and pass along the command line arguments |
Method Summary | |
---|---|
boolean |
action(int object_id,
int action_index)
Try and perfom an action on the server |
boolean |
attack()
Try to perform an attack on something/someone on the server |
ClientImpl |
getClient()
Get a reference to the current ClientImp class |
int |
getSecurityToken()
|
java.lang.String[] |
getUsers()
Gets a list of active users |
boolean |
login(java.lang.String username,
java.lang.String password)
Try and authenticate to the game server |
void |
logout()
Logout from the game server |
boolean |
move(int x,
int y)
Try and perform a move operation on your player |
void |
sendMessage(java.lang.String message)
Sends a chat message to the server |
void |
start()
Start the main loop thread |
void |
stop()
Stop the orb and kill the main loop |
boolean |
useItem(int item_id)
Try and use an item |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServerConnection(java.lang.String[] args)
args
- CommandLine arguments for the program. Used to initialise corba.Method Detail |
---|
public ClientImpl getClient()
public int getSecurityToken()
public void stop()
public void start()
public boolean action(int object_id, int action_index) throws AuthenticationException, InvalidSecurityToken
action_index
- The id of the action to be performed
AuthenticationException
- if user is not logged in
InvalidSecurityToken
InvalidSecurityToken
- When this method is called with an invalid token
InvalidSecurityToken
public boolean attack() throws AuthenticationException, InvalidSecurityToken
AuthenticationException
- if user is not logged in
InvalidSecurityToken
- When this method is called with an invalid tokenpublic boolean login(java.lang.String username, java.lang.String password)
username
- Username for a playerpassword
- Password for the player
public void logout() throws AuthenticationException, InvalidSecurityToken
AuthenticationException
- if user is not logged in
InvalidSecurityToken
- When this method is called with an invalid tokenpublic boolean move(int x, int y) throws AuthenticationException, InvalidSecurityToken
x
- New X coordinatey
- New Y coordinate
AuthenticationException
- if user is not logged in
InvalidSecurityToken
- When this method is called with an invalid tokenpublic boolean useItem(int item_id) throws AuthenticationException, InvalidSecurityToken
item_id
- Id of the item to be used
AuthenticationException
- if user is not logged in
InvalidSecurityToken
- When this method is called with an invalid tokenpublic java.lang.String[] getUsers() throws InvalidSecurityToken, AuthenticationException
AuthenticationException
- if user is not logged in
InvalidSecurityToken
- When this method is called with an invalid tokenpublic void sendMessage(java.lang.String message) throws InvalidSecurityToken, AuthenticationException
message
- Message to be send
AuthenticationException
- if user is not logged in
InvalidSecurityToken
- When this method is called with an invalid token
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |