This package provides classes used for the core communication of the STARS system.
For using the communication api as a client there are four classes/interfaces important: At the beginning you have to invoke a connection to the Dispatcher:
        DispatchCommunicator communicator
= new DispatchCommunicator(argv[0],argv[1]);

The first parameter is the address of the dispatcher, in the current implementation as a rmi address, that means : "rmi://<ip.addr.>/Dispatcher", where <ip.addr.> is the ip address of the Dispatcher server. (might be a symbolic name). The second parameter is the ID of the client. This must be a unique string, no two clients with the same ID are allowed to register to the Dispatcher at the same time. The ID is related to the maschine, not to the user. One user could login on serveral maschines. The ID is always accepted when it is unique. Authentification is done with the user name. So, before you can use the connection to the dispatcher, you have to login with a user name and a password.
        communicator.login(name,password);

In the current implementation, because of the reason that there is no login service implemented, all combinations of two strings will be accepted by the system. (However, you have to login before using the Dispatcher!)

After you installed the DispatchCommunicator and logged in, you can use it to create connections to services. To offer a service, you need two more classes/Interfaces:

If you implement a service, you have to implement a ServiceCallListener for this service. The ServiceCallListener contains the method, which will be invoked by the system, every time a client tries to get a Connector to the service. In this method you have to set the ConnectorListeners for your service. The createst part of your service might be implemented in ConnectorListeners.
You have two possibilities to implement ConnectorListeners.

This page is hosted by the Chair for Applied Software Engineering of the Technische Universität München.
Imprint (Impressum)