org.sblim.slp
Class TemplateRegistry

java.lang.Object
  extended byorg.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).


Constructor Summary
TemplateRegistry()
           
 
Method Summary
abstract  ServiceLocationAttributeVerifier attributeVerifier(java.lang.String pDocumentURL)
          Reads the template document URL and returns an attribute verifier for the service type.
abstract  void deregisterServiceTemplate(ServiceType pType, java.util.Locale pLocale, java.lang.String pVersion)
          Deregister the template for the service type.
abstract  java.lang.String findTemplateURL(ServiceType pType, java.util.Locale pLocale, java.lang.String pVersion)
          Returns the URL for the template document.
static TemplateRegistry getTemplateRegistry()
          Returns the distinguished TemplateRegistry object for performing operations on and with service templates.
abstract  void registerServiceTemplate(ServiceType pType, java.lang.String pDocumentURL, java.util.Locale pLocale, java.lang.String pVersion)
          Register the service template with the template registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplateRegistry

public TemplateRegistry()
Method Detail

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

Returns:
The template registry

registerServiceTemplate

public abstract void registerServiceTemplate(ServiceType pType,
                                             java.lang.String pDocumentURL,
                                             java.util.Locale pLocale,
                                             java.lang.String pVersion)
                                      throws ServiceLocationException
Register the service template with the template registry.

Parameters:
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.
Throws:
ServiceLocationException

deregisterServiceTemplate

public abstract void deregisterServiceTemplate(ServiceType pType,
                                               java.util.Locale pLocale,
                                               java.lang.String pVersion)
                                        throws ServiceLocationException
Deregister the template for the service type.

Parameters:
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.
Throws:
ServiceLocationException

findTemplateURL

public abstract java.lang.String findTemplateURL(ServiceType pType,
                                                 java.util.Locale pLocale,
                                                 java.lang.String pVersion)
                                          throws ServiceLocationException
Returns the URL for the template document.

Parameters:
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.
Returns:
The URL
Throws:
ServiceLocationException

attributeVerifier

public abstract ServiceLocationAttributeVerifier attributeVerifier(java.lang.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.

Parameters:
pDocumentURL - A String containing the template document's URL. May not be the empty string.
Returns:
The verifier
Throws:
ServiceLocationException


Copyright © 2005, 2011 IBM Corporation. All Rights Reserved.