Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.jini.core.lookup
Class ServiceTemplate

    java.lang.Object
      net.jini.core.lookup.ServiceTemplate

All Implemented Interfaces:
  Serializable

public class ServiceTemplate
extends Object
implements Serializable

Items in the lookup service are matched using instance of this class. A service item (item) matches a service template (tmpl) if: item.serviceID equals tmpl.serviceID (or if tmpl.serviceID is null); and item.service is an instance of every type in tmpl.serviceTypes; and item.attributeSets contains at least one matching entry for each entry template in tmpl.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 serviceTypes and attributeSetTemplates, a null field is equivalent to an empty array; both represent a wildcard.

Since:
  1.0
See Also:
  Serialized Form

Field Summary
`Entry[]` | `attributeSetTemplates` Attribute set templates to match, or `null`.
`ServiceID` | `serviceID` Service ID to match, or `null`.
`Class[]` | `serviceTypes` Service types to match, or `null`.

Constructor Summary
`ServiceTemplate(ServiceID serviceID, Class[] serviceTypes, Entry[] attrSetTemplates)` Simple constructor.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### serviceID

    public ServiceID serviceID

  Service ID to match, or `null`.

### serviceTypes

    public Class[] serviceTypes

  Service types to match, or `null`.

### attributeSetTemplates

    public Entry[] attributeSetTemplates

  Attribute set templates to match, or `null`.

Constructor Detail

### ServiceTemplate

    public ServiceTemplate(ServiceID serviceID,
                           Class[] serviceTypes,
                           Entry[] attrSetTemplates)

  Simple constructor.

Parameters:
  `serviceID` - service ID to match, or null
  `serviceTypes` - service types to match, or null
  `attrSetTemplates` - attribute set templates to match, or null

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 Sun Microsystems, Inc. All rights reserved