org.javagroups.conf
Class ConfiguratorFactory

java.lang.Object
  extended byorg.javagroups.conf.ConfiguratorFactory

public class ConfiguratorFactory
extends java.lang.Object

Title: Java Groups Communications Description: Contact me at filip@filip.net Copyright: Copyright (c) 2002 Company: www.filip.net

Version:
1.0
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
Author:
Filip Hanik

Field Summary
static java.lang.String JAR_MISSING_ERROR
           
 
Constructor Summary
protected ConfiguratorFactory()
           
 
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
 

Field Detail

JAR_MISSING_ERROR

public static final java.lang.String JAR_MISSING_ERROR
See Also:
Constant Field Values
Constructor Detail

ConfiguratorFactory

protected ConfiguratorFactory()
Method Detail

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

Returns:
a ProtocolStackConfigurator containing the stack configuration
Throws:
IOException - if it fails to parse the XML content
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.