JU.2. The JoinManager

The goal of any well-behaved Jini technology-enabled service (Jini service), implemented within the bounds defined by the Jini technology programming model, is to advertise the service it provides by requesting residency within at least one Jini lookup service. Making such a request of a Jini lookup service is known as registering with, or joining, a lookup service. To demonstrate this good behavior, a service must comply with both the multicast discovery protocol and the unicast discovery protocol to discover the lookup services it is interested in joining. The service must also comply with the join protocol to register with the desired lookup services. The details of the discovery and join protocols are described in, The Jini Technology Core Platform Specification,Discovery and Join”.

For the service to maintain its residency in the lookup services it has joined, the service must provide for the coordination, systematic renewal, and overall management of all leases on that residency. In addition to handling all discovery and join duties, as well as managing all leases on lookup residency, the service must provide for the coordination and management of any attribute sets with which it may have registered.

With respect to the duties described above, a Jini service may perform all but the attribute set management duties by using the helper utility classes LookupDiscoveryManager and LeaseRenewalManager. (For information on these classes, refer to The Jini Technology Core Platform Specification,Discovery and Join” and Jini Lease Renewal Service Specification).

Rather than writing a service to use these classes in a coordinated fashion (in addition to providing for attribute management), the service may be written to employ the JoinManager class from the net.jini.lookup package. This utility class performs all of the functions related to discovery, joining, service lease renewal, and attribute management that the Jini technology programming model requires of a well-behaved Jini service. Each of these activities is intimately involved with the maintenance of a service’s residency in one or more lookup services (the service’s join state), hence the name JoinManager.

The JoinManager class provides an implementation of the functionality described above. The use of this class in a wide variety of services can help mini mize the work resulting from having to repeatedly implement this required functionality in each service.

The JoinManager is a utility class, not a remote service. Jini services that wish to use this utility will create an instance of the JoinManager in the service’s address space to manage the entity’s join state locally.

Note that when the term service is used, it refers to the object that has created an instance of the JoinManager and avails itself of the public methods of that utility class.

JU.2.1. Other Types

The types defined in the specification of the JoinManager utility class are in the net.jini.lookup package. The following types may be referenced in this chapter. Whenever referenced, these object types will be referenced in unqualified form:

net.jini.core.lease.Lease 
net.jini.core.entry.Entry 
net.jini.core.lookup.ServiceID 
net.jini.core.lookup.ServiceRegistrar 
net.jini.core.lookup.ServiceRegistration 
net.jini.discovery.DiscoveryListener 
net.jini.discovery.DiscoveryManagement 
net.jini.lookup.entry.ServiceControlled 
net.jini.lease.LeaseRenewalManager 
net.jini.discovery.LookupLocatorDiscovery 
net.jini.discovery.LookupDiscoveryManager 
java.io.IOException 
java.rmi.MarshalledObject 
java.util.EventListener 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.184.3