public class ServiceTemplate extends Object implements Serializable, Cloneable
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.
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
ServiceTemplate(AtomicSerial.GetArg arg)
Constructor for @AtomicSerial, note that any instances of this
should be cloned in a secure stream to prevent an attacker retaining
a reference to mutable state.
|
ServiceTemplate(ServiceID serviceID,
Class[] serviceTypes,
Entry[] attrSetTemplates)
Simple constructor.
|
Modifier and Type | Method and Description |
---|---|
ServiceTemplate |
clone()
Clone has been implemented to allow utilities such as
ServiceDiscoveryManager to avoid sharing
internally stored instances with client code. |
String |
toString()
Returns a
String representation of this
ServiceTemplate . |
public ServiceID serviceID
public Class[] serviceTypes
public Entry[] attributeSetTemplates
public ServiceTemplate(AtomicSerial.GetArg arg) throws IOException
arg
- IOException
public ServiceTemplate clone()
ServiceDiscoveryManager
to avoid sharing
internally stored instances with client code.Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.