Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs
To interact with the lookup service, the client must first obtain a service registrar object via discovery, a network-level protocol used by Jini's runtime infrastructure. Discovery enables clients and services to locate lookup services.
(For more information on discovery, see Resources.) The service registrar object, which implements the net.jini.core.lookup.ServiceRegistrar interface, enables the client to interact with the lookup service. To find desired services, clients build a ServiceTemplate, an instance of class net.jini.core.lookup.ServiceTemplate, and pass it to one of two lookup() methods declared in the ServiceRegistrar interface. Each lookup() method sends the service template to the lookup service, which performs the query and returns matching service objects to
the client.
In general, a client looks up a service by Java type, usually an interface. For example, if a client needs to use a printer,
it composes a service template that includes a Class object for a well-known interface to printer services. All printer services implement the interface. The lookup service returns
a service object (or objects) that implement this interface. You can include attributes in the service template to narrow
the number of matches for such a type-based search. The client uses the printer service by invoking on the service object
the methods declared in the well-known interface.
With the ServiceTemplate class, you can express the search criteria for Jini lookups. The class consists solely of these three public fields:
public Entry[] attributeSetTemplates; public ServiceID serviceID; public Class[] serviceTypes;
ServiceTemplate has no methods, and its instances merely serve as "struct"-like containers for lookup service queries. Matches are performed
as described by the following excerpt from ServiceTemplate's javadoc page:
Items in the lookup service are matched using an instance of [ServiceTemplate]. A service item (item) matches a service template (tmpl) if:
item.serviceIDequalstmpl.serviceID(or iftmpl.serviceIDisnull)item.service[the service object] is an instance of every type intmpl.serviceTypesitem.attributeSetscontains at least one matching entry for each entry template intmpl.attributeSetTemplates
An entry matches an entry template if the class of the template is the same as, or a superclass of, the class of the entry, and every non-null field in the template equals the corresponding field of the entry. Every entry can be used to match more than one template. Note that in a service template, for
serviceTypesandattributeSetTemplates, a null field is equivalent to an empty array; both represent a wildcard.
As described here, the service template can include a reference to an array of Class objects. These objects indicate to the lookup service the Java type (or types) of the service object the client desires.
The service template can also include a service ID, which uniquely identifies a service, and attributes, which must exactly match the attributes uploaded by the service provider
in the service item. The service template can also contain wild cards for any of those fields. A wild card in the service
ID field, for example, will match any service ID.
subscribe jini-users.