org.opensaml.util
Class SimpleURLCanonicalizer

java.lang.Object
  extended by org.opensaml.util.SimpleURLCanonicalizer

public final class SimpleURLCanonicalizer
extends Object

This class performs simple canonicalization of a URL as follows:


Field Summary
private static Map<String,Integer> schemePortMap
          The scheme-to-port mapping data.
 
Constructor Summary
private SimpleURLCanonicalizer()
          Constructor to prevent instantiation.
 
Method Summary
static String canonicalize(String url)
          Canonicalize the supplied URL.
private static void canonicalize(URLBuilder url)
          Canonicalize the supplied URLBuilder data.
static void deregisterSchemePortMapping(String scheme)
          Deregister a scheme-to-port mapping.
static Integer getRegisteredPort(String scheme)
          Obtain the default port registered for a scheme.
static void registerSchemePortMapping(String scheme, Integer port)
          Register a new scheme-to-port mapping.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

schemePortMap

private static Map<String,Integer> schemePortMap
The scheme-to-port mapping data.

Constructor Detail

SimpleURLCanonicalizer

private SimpleURLCanonicalizer()
Constructor to prevent instantiation.

Method Detail

registerSchemePortMapping

public static void registerSchemePortMapping(String scheme,
                                             Integer port)
Register a new scheme-to-port mapping.

Parameters:
scheme - the scheme to register
port - the default port for that scheme

deregisterSchemePortMapping

public static void deregisterSchemePortMapping(String scheme)
Deregister a scheme-to-port mapping.

Parameters:
scheme - the scheme to deregister

getRegisteredPort

public static Integer getRegisteredPort(String scheme)
Obtain the default port registered for a scheme.

Parameters:
scheme - the scheme to look up
Returns:
the default port registered for the scheme, or null if none registered

canonicalize

public static String canonicalize(String url)
Canonicalize the supplied URL.

Parameters:
url - the URL to canonicalize
Returns:
the canonicalized URL

canonicalize

private static void canonicalize(URLBuilder url)
Canonicalize the supplied URLBuilder data.

Parameters:
url - the URLBuilder to canonicalize


Copyright © 1999-2013. All Rights Reserved.