javax.rules
Class RuleServiceProviderManager

java.lang.Object
  extended byjavax.rules.RuleServiceProviderManager

public abstract class RuleServiceProviderManager
extends java.lang.Object

This class manages available RuleServiceProvider instances in a manner similar to the JDBC DriverManager and Driver classes. Vendors extend the RuleServiceProvider class and register them (against a URI) with the RuleServiceProviderManager class.

This class should be used in environments without a JNDI provider - typically when writing standalone J2SE clients. Within the J2EE environment the RuleServiceProvider implementation class provided by your rule engine vendor should be retrieved using a JNDI lookup.

Clients of rule services request a vendor's RuleServiceProvider instance using the getRuleServiceProvider method.

For example:
Class.forName( "org.jcp.jsr94.ri.RuleServiceProvider" );

RuleServiceProvider serviceProvider = RuleServiceProviderManager.getRuleServiceProvider( "org.jcp.jsr94.ri.RuleServiceProvider" );

See Also:
RuleServiceProvider

Method Summary
static void deregisterRuleServiceProvider(java.lang.String uri)
          Deregister a RuleServiceProvider Class from a given URI.
static RuleServiceProvider getRuleServiceProvider(java.lang.String uri)
          Return a RuleServiceProvider for a given registration URI.
static void registerRuleServiceProvider(java.lang.String uri, java.lang.Class providerClass)
          Register a RuleServiceProvider Class against a given URI
static void registerRuleServiceProvider(java.lang.String uri, java.lang.Class providerClass, java.lang.ClassLoader classLoader)
          Register a RuleServiceProvider Class against a given URI, and associate a ClassLoader with the RuleServiceProvider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

registerRuleServiceProvider

public static void registerRuleServiceProvider(java.lang.String uri,
                                               java.lang.Class providerClass)
                                        throws ConfigurationException
Register a RuleServiceProvider Class against a given URI

Parameters:
uri - the vendors registration URI
providerClass - the Class instance for the vendor's RuleServiceProvider
Throws:
ConfigurationException

registerRuleServiceProvider

public static void registerRuleServiceProvider(java.lang.String uri,
                                               java.lang.Class providerClass,
                                               java.lang.ClassLoader classLoader)
                                        throws ConfigurationException
Register a RuleServiceProvider Class against a given URI, and associate a ClassLoader with the RuleServiceProvider.

Parameters:
uri - the vendors registration URI
providerClass - the Class instance for the vendor's RuleServiceProvider
classLoader - the ClassLoader that the providerClass should use to load its service classes.
Throws:
ConfigurationException

deregisterRuleServiceProvider

public static void deregisterRuleServiceProvider(java.lang.String uri)
Deregister a RuleServiceProvider Class from a given URI.

Parameters:
uri - the URI previously registered through registerRuleServiceProvider

getRuleServiceProvider

public static RuleServiceProvider getRuleServiceProvider(java.lang.String uri)
                                                  throws ConfigurationException
Return a RuleServiceProvider for a given registration URI.

Parameters:
uri - the vendor's registration URI
Returns:
the vendor's RuleServiceProvider implementation class.
Throws:
ConfigurationException


Copyright © 2004 Java Community Process. All Rights Reserved.