JINI Technology





The java applet guide
The applet components:
The JINI Actors:
-
2 Lookup Services: phobos.iro.umontreal.ca and rif.iro.umontreal.ca
-
1 Service Provider: vor.iro.umontreal.ca with 2 services: printer and a
camera video
-
1 User: cyclope.iro.umontreal.ca
Buttons, check boxes,
lists and text areas:
-
Open JINI: Allows the use of all the functionalities of the applet.
-
Close JINI: Resets all the functions.
-
SP First time: If checked, for the registration of the services the SP
must at first discover the LSs with a multicast discovery before the registration,
the ‘Deregister service’ is disabled at the first time (SP still doesn’t
know the LSs and no services are registered).
-
SP Services list: Contains the services to be registered or deregistered
by the SP at the LSs.
-
Register service: Allows registration of the services.
-
Deregister service: Allows deregistration of the services registered.
-
Crashed LS: Eliminates the availability of the LSs.(In this case the USER
will request the SP).
-
Refresh LS: Returns the availability of the LS.
-
USER Services List: Contains the services USER will request.
-
USER First Time: If checked, the USER discover the LSs and SP before requesting
a service on the network.
-
Service Available for user: is the list of services discovered by the user.
Double click on the service will release its use.
-
Speed: Indicates the level of the speed of the ball.
-
Media: is the sound status, ON or OFF. Each action of the program has its
own sound.
-
Help: shows the Help window on the Service Location Protocol and the applet
guide.
-
Service Agent, User Agent, Directory Agent
and Directory Agent1 text areas: show each status of the actors when an
action is executed.
-
Messages Description: Contains the structure of each message sent
and received.
-
vor.iro.umontreal.ca, phobos.umontreal.ca, cyclope.umontreal.ca and
rif.umontreal.ca buttons will release the requested action ( Service register,
Service Deregister, Service Request, LS Advertisement, SP Advertisement)
Actions
In
the JINI Simulation, we want to see how a user (User Agent) can get a simple
reply to his question: " Where can I find a printer and a Camera available
in the scope department INF.
The process of this request is split in different actions:
Services Registration:
At the beginning the operator can chose the status of the SP if its request
is for the first time.
· If ‘first time’ flag is checked the program pass in the following
steps:
-
SP multicasts a LS Discovery by the Service Request (Service: Lookup Service)
Figure 2. LS Advertisement
Figure 3. Service register
With these actions the LSs are discovered by the Service Provider and the
services are registered at the LSs.
-
If the ‘first time’ flag is not checked:
Service deregistration
The service deregistration can be accomplished in a condition that we have
already registered services
o SP send Service Deregister to LS for the service: Printer or Camera.
Figure 5. Service Deregistration
o LSs unicast to the SP a LS Acknowledgment. Afterward LS send a LS
Advertisement.
PS: The services registered or deleted will respectively appear or
diSPppear from the ‘Active service list’. We can choose the service we
need to use from this list. (USER will use the services appearing in this
list)
Service
Request
-
In order to use the services by the USER
o LSs reply by LS advertisement (USER is configured by the SCOPE=INF
then it will use the LS with the SPme scope in this case it’s Phobos)
Figure 7. DA Advertisement
o LS unicast to the USER a service reply with the addresses
of the available printers
o
Figure 8. Service Reply (Unicast)
o USER unicasts to the LS an Attribute request for more information
on the services
o LS unicasts the User Attribute reply with the requested information.
· If the ‘first time’ flag is not checked all the steps mentioned
above will be executed without the first two steps.
After the execution of these steps the program shows the printer
or the camera are working (Animated) and used by the USER.
DA crashed:
Figure 9. LS Crashed
o USER unicasts to the LS a Service Request for a desired service, but
LS doesn’t respond
o SER multicast a Service request (service : Lookup Service),but LS
does not respond
o USER multicast a Service request (service : Service Provider)
o SP multicast SP Advertisement
USER will unicast its services to the SP
Afterward all the services will be requested from the SP till USER
receive a LS advertisement.





Please send questions, comments, and/or suggestions
toelkhous@iro.umontreal.ca
Last updated 12/08/00