org.sourceprojects.xmlparser
Class ResourceResolverFactory

java.lang.Object
  extended by org.sourceprojects.xmlparser.ResourceResolverFactory

public final class ResourceResolverFactory
extends java.lang.Object

Defines a factory API that enables applications to obtain instances of ResourceResolver either by given standard implmentation or by configuring own implementation.

Since:
0.0.1
Author:
noctarius

Field Summary
static java.lang.String STANDARD_RESOURCERESOLVER_CLASS
          Classname for the standard ResourceResolver class to be created if no special implementation is given
 
Constructor Summary
ResourceResolverFactory()
           
 
Method Summary
static ResourceResolver newInstance()
          Obtain a new instance of a ResourceResolver
Implementation used for ResourceResolver is the standard one.
static ResourceResolver newInstance(java.lang.ClassLoader classLoader)
          Obtain a new instance of a ResourceResolver
Implementation used for ResourceResolver is the standard one.
static ResourceResolver newInstance(java.lang.String resolverImplementationClassname, java.lang.ClassLoader classLoader)
          Obtain a new instance of a ResourceResolver
Implementation used for ResourceResolver must be given as parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STANDARD_RESOURCERESOLVER_CLASS

public static final java.lang.String STANDARD_RESOURCERESOLVER_CLASS
Classname for the standard ResourceResolver class to be created if no special implementation is given

See Also:
Constant Field Values
Constructor Detail

ResourceResolverFactory

public ResourceResolverFactory()
Method Detail

newInstance

public static final ResourceResolver newInstance()
                                          throws XmlParserInitializationException
Obtain a new instance of a ResourceResolver
Implementation used for ResourceResolver is the standard one. The classloader to load up this implementation is the actual ContextClassLoader of the actual thread.

Returns:
New instance of standard ResourceResolver implementation
Throws:
XmlParserInitializationException - If some exception occurs on initialization of the new instance the exception is wrapped into a XmlParserInitializationException

newInstance

public static final ResourceResolver newInstance(java.lang.ClassLoader classLoader)
                                          throws XmlParserInitializationException
Obtain a new instance of a ResourceResolver
Implementation used for ResourceResolver is the standard one. The classloader to load up those implementations is the given classloader.

Parameters:
classLoader - The classloader to load classes
Returns:
New instance of standard ResourceResolver implementation
Throws:
XmlParserInitializationException - If some exception occurs on initialization of the new instance the exception is wrapped into a XmlParserInitializationException

newInstance

public static final ResourceResolver newInstance(java.lang.String resolverImplementationClassname,
                                                 java.lang.ClassLoader classLoader)
                                          throws XmlParserInitializationException
Obtain a new instance of a ResourceResolver
Implementation used for ResourceResolver must be given as parameter. The classloader to load up those implementations is the given classloader.

Parameters:
resolverImplementationClassname -
classLoader - The classloader to load classes
Returns:
New instance of standard ResourceResolver implementation
Throws:
XmlParserInitializationException - If some exception occurs on initialization of the new instance the exception is wrapped into a XmlParserInitializationException


Copyright © 2010. All Rights Reserved.