org.milyn
Class SmooksOSGIFactory
java.lang.Object
org.milyn.SmooksOSGIFactory
- All Implemented Interfaces:
- SmooksFactory
public class SmooksOSGIFactory
- extends Object
- implements SmooksFactory
A factory class for creating Smooks instances in an OSGi environment.
This factory will create create a class loader that is able to delegate
to the bundles classloader.
- Author:
- Daniel Bevenius
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SmooksOSGIFactory
public SmooksOSGIFactory(org.osgi.framework.Bundle bundle)
createInstance
public Smooks createInstance()
- Creates a new Smooks instance using the
Bundle passed in.
Calling this method is equivalent to calling #create(String) and passing
in null as the config.
- Specified by:
createInstance in interface SmooksFactory
- Returns:
- Smooks a newly created Smooks instance that is un-configured.
createInstance
public Smooks createInstance(InputStream config)
throws IOException,
SAXException
- Creates a new Smooks instance using the
Bundle passed in and adds the passed-in
configuration.
- Specified by:
createInstance in interface SmooksFactory
- Parameters:
bundle - the OSGi bundle for which a delegating classloader will be created.config - the configuration that should be added to the newly created Smooks instance. If null
then a non-configured Smooks instance will be returned.
- Returns:
- Smooks a newly created Smooks instance.
- Throws:
IOException
SAXException
createInstance
public Smooks createInstance(String config)
throws IOException,
SAXException
- Specified by:
createInstance in interface SmooksFactory
- Throws:
IOException
SAXException
Copyright © 2014. All Rights Reserved.