org.ow2.carol.cmi.config
Class ProviderURLsParser

java.lang.Object
  extended by org.ow2.carol.cmi.config.ProviderURLsParser

@Immutable
public final class ProviderURLsParser
extends java.lang.Object

To parse a list of provider URLs.

Author:
The new CMI team

Method Summary
static java.util.List<java.lang.String> parse(java.lang.String input)
          Returns a list of provider URLs with scheme.
static java.util.Map<java.lang.String,java.util.List<java.lang.String>> parseMultiprotocol(java.lang.String input)
          Return an association of protocol name with a list of provider URLs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

parse

public static java.util.List<java.lang.String> parse(java.lang.String input)
                                              throws java.net.MalformedURLException
Returns a list of provider URLs with scheme.

Parameters:
input - a list of provider URLs without scheme (except the first)
Returns:
a list of provider URLs with scheme
Throws:
java.net.MalformedURLException - if the parameter is malformed

parseMultiprotocol

public static java.util.Map<java.lang.String,java.util.List<java.lang.String>> parseMultiprotocol(java.lang.String input)
                                                                                           throws java.net.MalformedURLException
Return an association of protocol name with a list of provider URLs. Example of input: jrmp::rmi://193.145.1.6:1099,193.145.1.9:1099;irmi::rmi://193.145.1.6:1098;iiop::iiop://193.145.1.6:2001.

Parameters:
input - a sequential representation of an association of protocol name with a list of provider URLs
Returns:
an association of protocol name with a list of provider URLs
Throws:
java.net.MalformedURLException - if the parameter is malformed


Copyright © 2008 OW2 Consortium. All Rights Reserved.