org.sblim.slp
Interface ServiceLocationAttributeVerifier
public interface ServiceLocationAttributeVerifier
The ServiceLocationAttributeVerifier provides access to service templates.
Classes implementing this interface parse SLP template definitions, provide
information on attribute definitions for service types, and verify whether a
ServiceLocationAttribute object matches a template for a particular service
type. Clients obtain ServiceLocationAttributeVerifier objects for specific
SLP service types through the TemplateRegistry.
getAttributeDescriptor
public abstract ServiceLocationAttributeDescriptor getAttributeDescriptor(String pAttributeId)
Return the ServiceLocationAttributeDescriptor for the attribute having
the named id. If no such attribute exists in this template, return null.
This method is primarily for GUI tools to display attribute information.
Programmatic verification of attributes should use the verifyAttribute()
method.
pAttributeId
- The attribute id
getAttributeDescriptors
public abstract Enumeration getAttributeDescriptors()
Returns an Enumeration allowing introspection on the attribute definition
in the service template. The Enumeration returns
ServiceLocationAttributeDescriptor objects for the attributes. This
method is primarily for GUI tools to display attribute information.
Programmatic verification of attributes should use the verifyAttribute()
method.
- Enumeration of attribute descriptors
getDescription
public abstract String getDescription()
Return the descriptive help text for the template.
getLocale
public abstract Locale getLocale()
Return the language locale of the template.
getServiceType
public abstract ServiceType getServiceType()
Returns the SLP service type for which this is the verifier.
getURLSyntax
public abstract String getURLSyntax()
Return the URL syntax expression for the service: URL.
getVersion
public abstract String getVersion()
Return the template version number identifier.
verifyAttribute
public abstract void verifyAttribute(ServiceLocationAttribute pAttribute)
throws ServiceLocationException
Verify that the attribute matches the template definition. If the
attribute doesn't match, ServiceLocationException is thrown with the
error code as ServiceLocationException.PARSE_ERROR.
pAttribute
- The ServiceLocationAttribute object to be verified.
verifyRegistration
public abstract void verifyRegistration(Vector pAttributeVector)
throws ServiceLocationException
Verify that the Vector of ServiceLocationAttribute objects matches the
template for this service type. The vector must contain all the required
attributes, and all attributes must match their template definitions. If
the attributes don't match, ServiceLocationException is thrown with the
error code as ServiceLocationException.PARSE_ERROR
pAttributeVector
- A Vector of ServiceLocationAttribute objects for the
registration.
Copyright © 2005, 2009 IBM Corporation. All Rights Reserved.