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
2. PlainConfigurator - uses the old style strings UDP:FRAG: etc etc
getStackConfigurator(File file) Returns a protocol stack configurator based on the XML configuration
provided by the specified File.
Parameters: file - a File with a JGroups XML configuration.
getStackConfigurator(URL url) Returns a protocol stack configurator based on the XML configuration
provided at the specified URL.
Parameters: url - a URL pointing to a JGroups XML configuration.
getStackConfigurator(Element element) Returns a protocol stack configurator based on the XML configuration
provided by the specified XML element.
Parameters: element - a XML element containing a JGroups XML configuration.
getXmlConfigurator(String properties) Returns an XmlConfigurator based on the provided properties string (if
possible).
Parameters: properties - a string representing a system resource containing aJGroups XML configuration, a string representing a URLpointing to a JGroups ML configuration, or a stringrepresenting a file name that contains a JGroups XMLconfiguration.
Check to see if the specified configuration properties are
null which is not allowed.
Parameters: properties - the specified protocol stack configuration. throws: NullPointerException - if the specified configuration propertiesare null.
Checks the availability of the JAXP classes on the classpath.
throws: NoClassDefFoundError - if the required JAXP classes are notavailabile on the classpath.
Creates a ChannelException instance based upon a
configuration problem.
Parameters: cause - the exceptional configuration condition to be used as thecreated ChannelException's cause.
Returns a JGroups XML configuration InputStream based on the provided
properties string.
Parameters: properties - a string representing a system resource containing aJGroups XML configuration, a string representing a URLpointing to a JGroups ML configuration, or a stringrepresenting a file name that contains a JGroups XMLconfiguration. throws: IOException - if the provided properties string appears to be avalid URL but is unreachable.
Returns a protocol stack configurator based on the XML configuration
provided by the specified File.
Parameters: file - a File with a JGroups XML configuration. a ProtocolStackConfigurator containing the stackconfiguration. throws: ChannelException - if problems occur during the configuration ofthe protocol stack.
Returns a protocol stack configurator based on the XML configuration
provided at the specified URL.
Parameters: url - a URL pointing to a JGroups XML configuration. a ProtocolStackConfigurator containing the stackconfiguration. throws: ChannelException - if problems occur during the configuration ofthe protocol stack.
Returns a protocol stack configurator based on the XML configuration
provided by the specified XML element.
Parameters: element - a XML element containing a JGroups XML configuration. a ProtocolStackConfigurator containing the stackconfiguration. throws: ChannelException - if problems occur during the configuration ofthe protocol stack.
Returns a protocol stack configurator based on the provided properties
string.
Parameters: properties - an old style property string, a string representing asystem resource containing a JGroups XML configuration,a string representing a URL pointing to a JGroups XMLXML configuration, or a string representing a file namethat contains a JGroups XML configuration.
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 a ProtocolStackConfigurator containing the stack configuration throws: IOException - if it fails to parse the XML content throws: IOException - if the URL is invalid or a the content can not be reached
Returns an XmlConfigurator based on the provided properties string (if
possible).
Parameters: properties - a string representing a system resource containing aJGroups XML configuration, a string representing a URLpointing to a JGroups ML configuration, or a stringrepresenting a file name that contains a JGroups XMLconfiguration. an XmlConfigurator instance based on the provided propertiesstring; null if the provided properties string doesnot point to an XML configuration. throws: IOException - if the provided properties string appears to be avalid URL but is unreachable, or if the JGroups XMLconfiguration pointed to by the URL can not beparsed.