com.accendia.iris.system.interfaces
Interface IAdminCommand


public interface IAdminCommand

This interface is implemented by the admin command of the system application. It contains the methods that return information about the applications running on the server and user login methods. The typical client is not using the system application directly but through the ServerContext object.


Field Summary
static int SERVER_ERROR
          Return code indicating an unexpected server error.
static int SUCCESS
          Return code indicating operation succeeded.
static int WRONG_PASSWORD
          Return code indicating the supplied password is wrong.
static int WRONG_USER
          Return code indicating the user does not exist.
 
Method Summary
 IApplicationObjects getApplicationObjects(int appIdx)
          Returns an object describing the structure of the application.
 java.lang.String[] getApplications()
          Returns the names of the applications installed on the server.
 IChecksumInterfaces getCommandInterfaces(int appIdx, int cmdIdx)
          Returns the Checksummed interfaces implemented by the specified command.
 IChecksumInterfaces getFactoryInterfaces(int appIdx, int cmdIdx)
          Returns the Checksummed interfaces implemented by the specified command factory.
 int login(java.lang.String user, char[] password)
          Called by the server to login the user.
 IServerAuthInfo setupSecureMode(byte[] publicKey)
          Called by the server context to setup secure mode.
 

Field Detail

SUCCESS

static final int SUCCESS
Return code indicating operation succeeded.

See Also:
Constant Field Values

SERVER_ERROR

static final int SERVER_ERROR
Return code indicating an unexpected server error.

See Also:
Constant Field Values

WRONG_PASSWORD

static final int WRONG_PASSWORD
Return code indicating the supplied password is wrong.

See Also:
Constant Field Values

WRONG_USER

static final int WRONG_USER
Return code indicating the user does not exist.

See Also:
Constant Field Values
Method Detail

getApplications

java.lang.String[] getApplications()
                                   throws java.io.IOException
Returns the names of the applications installed on the server.

Returns:
The names of the applications installed on the server.
Throws:
java.io.IOException

getApplicationObjects

IApplicationObjects getApplicationObjects(int appIdx)
                                          throws java.io.IOException
Returns an object describing the structure of the application. The index supplied is the position of the application name in the array returned by the getApplications() call.

Parameters:
appIdx - The application index.
Returns:
The application structure.
Throws:
java.io.IOException

getCommandInterfaces

IChecksumInterfaces getCommandInterfaces(int appIdx,
                                         int cmdIdx)
                                         throws java.io.IOException
Returns the Checksummed interfaces implemented by the specified command. The application index supplied is the position of the application name in the array returned by the getApplications() call. The command index supplied is the position of the command name in the commands array returned in the getApplicationObjects(appIdx) call.

Throws:
java.io.IOException

getFactoryInterfaces

IChecksumInterfaces getFactoryInterfaces(int appIdx,
                                         int cmdIdx)
                                         throws java.io.IOException
Returns the Checksummed interfaces implemented by the specified command factory. The application index supplied is the position of the application name in the array returned by the getApplications() call. The factory index supplied is the position of the factory name in the factories array returned in the getApplicationObjects(appIdx) call.

Throws:
java.io.IOException

setupSecureMode

IServerAuthInfo setupSecureMode(byte[] publicKey)
                                throws java.io.IOException
Called by the server context to setup secure mode. The client should never call this method directly.

Parameters:
publicKey - The public key of the client
Returns:
An object that encapsulate information required to authenticate the server and setup the secure connection
Throws:
java.io.IOException

login

int login(java.lang.String user,
          char[] password)
          throws java.io.IOException
Called by the server to login the user. The client should never call this method directly.

Parameters:
user - The user name
password - The user password
Returns:
Code indicating success or an error reason.
Throws:
java.io.IOException