org.ogf.graap.wsag.api.configuration
Class WSAG4JConfiguration
java.lang.Object
org.ogf.graap.wsag.api.configuration.WSAG4JConfiguration
public class WSAG4JConfiguration
- extends Object
MSSConfiguration This class provides basic configuration mechanisms for WSAG4J components.
- Author:
- Oliver Waeldrich
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WSAG4JConfiguration
public WSAG4JConfiguration()
getConfigurationPath
public static String getConfigurationPath()
- Returns:
- the configuration path for this module
findImplementation
public static Object findImplementation(Class<?> interfaceDef,
String configFile,
String defaultImpl)
- Finds an implementation for a given interface.
- Parameters:
interfaceDef
- the interface definition to find an implementation forconfigFile
- the configuration file that specifies the appropriate implementationdefaultImpl
- the default implementation to use
- Returns:
- The instance of the implementation class
findSingeltonImplementation
public static Object findSingeltonImplementation(Class<?> interfaceDef,
String configFile,
String defaultImpl)
- Finds a singleton implementation for a given interface.
- Parameters:
interfaceDef
- the interface definition to find an implementation forconfigFile
- the configuration file that specifies the appropriate implementationdefaultImpl
- the default implementation to use
- Returns:
- The instance of the implementation class
findResource
public static InputStream findResource(String resourceName)
throws IOException
- Parameters:
resourceName
- The name of the requested resource.
- Returns:
- The requested resource as
InputStream
.
- Throws:
IOException
- there was an error reading the resource
findResource
public static InputStream findResource(String path,
String resourceName)
throws IOException
- Parameters:
path
- The path to the requested resource. If the resource is not found at the specified location
discovery will be performed.resourceName
- The name of the requested resource.
- Returns:
- The requested resource as an InputStream.
- Throws:
IOException
- there was an error reading the resource
findResourceURL
public static URL findResourceURL(String resourceName)
throws IOException
- Parameters:
resourceName
- The name of the requested resource.
- Returns:
- The URL of the requested resource.
- Throws:
IOException
- there was an error reading the resource
findResourceURL
public static URL findResourceURL(String path,
String resourceName)
throws IOException
- Parameters:
path
- The path to the requested resource. If the resource is not found at the specified location
discovery will be performed.resourceName
- The name of the requested resource.
- Returns:
- The URL of the requested resource.
- Throws:
IOException
- there was an error reading the resource
Copyright © 2008-2012. All Rights Reserved.