org.mule.util
Class SpiHelper
java.lang.Object
org.mule.util.SpiHelper
- public class SpiHelper
- extends java.lang.Object
Method Summary |
static java.lang.Class |
findService(java.lang.Class spi,
java.lang.Class currentClass)
Find class implementing a specified SPI. |
static java.lang.Class |
findService(java.lang.Class spi,
java.util.Properties props,
java.lang.Class currentClass)
Find class implementing a specified SPI. |
static java.lang.Class |
findService(java.lang.Class spi,
java.lang.String defaultImpl,
java.lang.Class currentClass)
Find class implementing a specified SPI. |
static java.lang.Class |
findService(java.lang.Class spi,
java.lang.String propertyFileName,
java.lang.String defaultImpl,
java.lang.Class currentClass)
Find class implementing a specified SPI. |
static java.io.InputStream |
findServiceDescriptor(java.lang.String path,
java.lang.String name,
java.lang.Class currentClass)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SERVICE_ROOT
public static final java.lang.String SERVICE_ROOT
- See Also:
- Constant Field Values
SpiHelper
public SpiHelper()
findService
public static java.lang.Class findService(java.lang.Class spi,
java.lang.String propertyFileName,
java.lang.String defaultImpl,
java.lang.Class currentClass)
- Find class implementing a specified SPI.
- Parameters:
spi
- Service Provider Interface Class.propertyFileName
- is a location of a property file that contains the SPI property valuedefaultImpl
- Default implementation class name.currentClass
- is used to include the classloader of the calling class in the search.
All system classloaders will be checked as well.
- Returns:
- Class implementing the SPI or null if a service was not found
findService
public static java.lang.Class findService(java.lang.Class spi,
java.lang.String defaultImpl,
java.lang.Class currentClass)
- Find class implementing a specified SPI. The system properties will be
checked for an SPI property to use. this will be the fully qualified SPI class name.
- Parameters:
spi
- Service Provider Interface Class.defaultImpl
- Default implementation class name.currentClass
- is used to include the classloader of the calling class in the search.
All system classloaders will be checked as well.
- Returns:
- Class implementing the SPI or the default implementation class if nothing has been found
findService
public static java.lang.Class findService(java.lang.Class spi,
java.lang.Class currentClass)
- Find class implementing a specified SPI. The system properties will be
checked for an SPI property to use. this will be the fully qualified SPI class name.
- Parameters:
spi
- Service Provider Interface Class.currentClass
- is used to include the classloader of the calling class in the search.
All system classloaders will be checked as well.
- Returns:
- Class implementing the SPI or null if a service was not found
findService
public static java.lang.Class findService(java.lang.Class spi,
java.util.Properties props,
java.lang.Class currentClass)
- Find class implementing a specified SPI.
- Parameters:
spi
- Service Provider Interface Class.currentClass
- is used to include the classloader of the calling class in the search.props
- The properties will be
checked for an SPI property to use. this will be the fully qualified SPI class name.
All system classloaders will be checked as well.
- Returns:
- Class implementing the SPI or null if a service was not found
findServiceDescriptor
public static java.io.InputStream findServiceDescriptor(java.lang.String path,
java.lang.String name,
java.lang.Class currentClass)
Copyright © 2003-2005 SymphonySoft Limited. All Rights Reserved.