org.javagroups.conf
Class ConfiguratorFactory
java.lang.Object
|
+--org.javagroups.conf.ConfiguratorFactory
- public class ConfiguratorFactory
- extends java.lang.Object
The ConfigurationFactory is a factory that returns a protocol stack configurator.
The protocol stack configurator is an object that read a stack configuration and
parses it so that the ProtocolStack can create a stack.
Currently the factory returns one of the following objects:
1. XmlConfigurator - parses XML files that are according to the javagroups-protocol.dtd
2. PlainConfigurator - uses the old style strings UDP:FRAG: etc etc
- Version:
- 1.0
- Author:
- Filip Hanik (filip@filip.net)
Method Summary |
static ProtocolStackConfigurator |
getStackConfigurator(java.lang.Object properties)
Returns a protocol stack configurator based on the properties passed in.
If the properties parameter is a plain string UDP:FRAG:MERGE:GMS etc, a PlainConfigurator is returned.
If the properties parameter is a string that represents a url for example http://www.filip.net/test.xml
or the parameter is a java.net.URL object, an XmlConfigurator is returned
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JAR_MISSING_ERROR
public static final java.lang.String JAR_MISSING_ERROR
- See Also:
- Constant Field Values
ConfiguratorFactory
protected ConfiguratorFactory()
getStackConfigurator
public static ProtocolStackConfigurator getStackConfigurator(java.lang.Object properties)
throws java.io.IOException
- Returns a protocol stack configurator based on the properties passed in.
If the properties parameter is a plain string UDP:FRAG:MERGE:GMS etc, a PlainConfigurator is returned.
If the properties parameter is a string that represents a url for example http://www.filip.net/test.xml
or the parameter is a java.net.URL object, an XmlConfigurator is returned
- Parameters:
properties
- old style property string, url string, or java.net.URL object
- Returns:
- a ProtocolStackConfigurator containing the stack configuration
- Throws:
java.io.IOException
- if it fails to parse the XML content
java.io.IOException
- if the URL is invalid or a the content can not be reached
java.lang.ClassNotFoundException
- if the JAXP parser libraries are not found in the classpath
Copyright ? 2001,2002 www.javagroups.com . All Rights Reserved.