Public Member Functions | |
AuthenticationData | authenticate (long executionId, String question) throws RemoteException |
void | components_available (ComponentInfo[] components) throws RemoteException |
void | components_unavailable (String[] components) throws RemoteException |
void | disconnect () throws RemoteException |
void | message (MessageType type, String message) throws RemoteException |
void | taggedmessage (MessageType type, short id, String message) throws RemoteException |
String | name () throws RemoteException |
boolean | ping () throws RemoteException |
String | getRemoteLocation () throws RemoteException |
void | release () |
Every client of a Component service that is not itself a Component must implement an interface called Client. The interface allows the client to act as a secure party in the communication with the components, to receive general-purpose string messages from the MACI components and to be notified when any change happens to the components that the client utilizes. Each client logs in to the MACI system before any other requests are made, and in turn it obtains an handle, which it must use in every subsequent request to the MACI.
AuthenticationData com.cosylab.acs.maci.Client.authenticate | ( | long | executionId, | |
String | question | |||
) | throws RemoteException |
Authentication method. Method authenticate is the challenge issued to the client after it tries to login. The login will be successful if the client's authenticate() produces the expected result. Only in this case will the Manager's login method return a valid handle, which the client will later use as the id parameter with all calls to the Manager.
question | The question posed by the Manager. |
Implemented in com.cosylab.acs.maci.plug.ClientImpl.
Referenced by com.cosylab.acs.maci.plug.ClientProxy.authenticate().
void com.cosylab.acs.maci.Client.components_available | ( | ComponentInfo[] | components | ) | throws RemoteException |
Notify client about the change (availability) of the components currently in use by this client. For administrative clients, notification is issued for the change of availability of any component in the domain.
cobs | A sequence of ComponentInfo structures identifying the affected components. Regular clients receive the name, the type, the handle and the reference of the newly activated component. Administrative clients also receive the handle of the container where the component was activated. |
Implemented in com.cosylab.acs.maci.plug.ClientImpl.
Referenced by com.cosylab.acs.maci.plug.ClientProxy.components_available().
void com.cosylab.acs.maci.Client.components_unavailable | ( | String[] | components | ) | throws RemoteException |
Notify client that some of the components currently in use by client have become unavailable.
cobs | CURLs of the unavailable components. |
Implemented in com.cosylab.acs.maci.plug.ClientImpl.
Referenced by com.cosylab.acs.maci.plug.ClientProxy.components_unavailable().
void com.cosylab.acs.maci.Client.disconnect | ( | ) | throws RemoteException |
Disconnect notification. The disconnect method is called by the Manager to notify the client that it will be unavailable and that the client should log off.
Implemented in com.cosylab.acs.maci.plug.ClientImpl.
Referenced by com.cosylab.acs.maci.plug.ClientProxy.disconnect(), and com.cosylab.acs.maci.manager.ManagerImpl.shutdownContainer().
String com.cosylab.acs.maci.Client.getRemoteLocation | ( | ) | throws RemoteException |
Get location string (host).
Implemented in com.cosylab.acs.maci.plug.ClientImpl.
void com.cosylab.acs.maci.Client.message | ( | MessageType | type, | |
String | message | |||
) | throws RemoteException |
The Manager and administrators use this method for sending textual messages to the client.
type | Type of the message, instance of MessageType . | |
message | Contents of the message. The contents are human readable. |
Implemented in com.cosylab.acs.maci.plug.ClientImpl.
Referenced by com.cosylab.acs.maci.plug.ClientProxy.message().
String com.cosylab.acs.maci.Client.name | ( | ) | throws RemoteException |
Client name.
Implemented in com.cosylab.acs.maci.plug.ClientImpl.
Referenced by com.cosylab.acs.maci.plug.ClientProxy.name().
boolean com.cosylab.acs.maci.Client.ping | ( | ) | throws RemoteException |
Manager pings its clients (both GUI clients, as well as Containers) repeatedly to verify that they still exist. The return value can be either "true", indicating that everything is OK with the client, or "false", indicating that client is malfunctioning.
If RemoteTransientException
exception is thrown, the Manager should retry the ping several times, and only then shall the client be assumed to be malfunctioning. If another exception is thrown, the client may be immediately assumed to be malfunctioning. Once the client is found to be malfunctioning, the Manager makes an implicit logout of the client.
Implemented in com.cosylab.acs.maci.plug.ClientImpl.
Referenced by com.cosylab.acs.maci.plug.ClientProxy.ping(), and com.cosylab.acs.maci.manager.PingTimerTask.run().
void com.cosylab.acs.maci.Client.release | ( | ) |
Release remote resources of this object.
RemoteException |
Implemented in com.cosylab.acs.maci.plug.ClientImpl.
void com.cosylab.acs.maci.Client.taggedmessage | ( | MessageType | type, | |
short | id, | |||
String | message | |||
) | throws RemoteException |
The Manager and administrators use this method for sending tagged textual messages to the client.
type | Type of the message, instance of MessageType . | |
id | Tag of the message, integer | |
message | Contents of the message. The contents are human readable. |
Implemented in com.cosylab.acs.maci.plug.ClientImpl.
Referenced by com.cosylab.acs.maci.plug.ClientProxy.taggedmessage().