|
ServiceRegistrarA server for a service finds a service locator using either a unicast lookup with a LookupLocator or a multicast search using LookupDiscovery . In both cases, a ServiceRegistrar object is returned to act as a proxy for the lookup service. The server then registers the service with the service locator using the ServiceRegistrar 's register() method: package net.jini.core.lookup; public Class ServiceRegistrar { public ServiceRegistration register(ServiceItem item, long leaseDuration) throws java.rmi.RemoteException; } The second parameter here, leaseDuration , is a request for the length of time (in milliseconds ) the lookup service will keep the service registered. This request need not be honored ”the lookup service may reject it completely, or only grant a lesser time interval. This is discussed in Chapter 7. The first parameter is of ServiceItem type. |