org.sblim.slp
Class TemplateRegistry
java.lang.Object
org.sblim.slp.TemplateRegistry
public abstract class TemplateRegistry
extends java.lang.Object
Subclasses of the TemplateRegistry abstract class provide access to service
location templates [8]. Classes implementing TemplateRegistry perform a
variety of functions. They manage the registration and access of service type
template documents. They create attribute verifiers from service templates,
for verification of attributes and introspection on template documents. Note
that clients of the Advertiser are not required to verify attributes before
registering (though they may get a TYPE_ERROR if the implementation supports
type checking and there is a mismatch with the template).
attributeVerifier
public abstract ServiceLocationAttributeVerifier attributeVerifier(String pDocumentURL)
throws ServiceLocationException
Reads the template document URL and returns an attribute verifier for the
service type. The attribute verifier can be used for verifying that
registration attributes match the template, and for introspection on the
template definition.
pDocumentURL
- A String containing the template document's URL. May not be
the empty string.
deregisterServiceTemplate
public abstract void deregisterServiceTemplate(ServiceType pType,
Locale pLocale,
String pVersion)
throws ServiceLocationException
Deregister the template for the service type.
pType
- The service type.pLocale
- A Locale object containing the language locale of the
template.pVersion
- A String containing the version number. Use null to indicate
the latest version.
findTemplateURL
public abstract String findTemplateURL(ServiceType pType,
Locale pLocale,
String pVersion)
throws ServiceLocationException
Returns the URL for the template document.
pType
- The service type.pLocale
- A Locale object containing the language locale of the
template.pVersion
- A String containing the version number. Use null to indicate
the latest version.
getTemplateRegistry
public static TemplateRegistry getTemplateRegistry()
Returns the distinguished TemplateRegistry object for performing
operations on and with service templates. Returns null if the
implementation doesn't support TemplateRegistry functionality.
Not yet implemented
registerServiceTemplate
public abstract void registerServiceTemplate(ServiceType pType,
String pDocumentURL,
Locale pLocale,
String pVersion)
throws ServiceLocationException
Register the service template with the template registry.
pType
- The service type.pDocumentURL
- A string containing the URL of the template document. May not
be the empty string.pLocale
- A Locale object containing the language locale of the
template.pVersion
- The version number identifier of template document.
Copyright © 2005, 2007 IBM Corporation. All Rights Reserved.