org.sourceprojects.xmlparser
Class XmlParserActivator
java.lang.Object
org.sourceprojects.xmlparser.XmlParserActivator
- All Implemented Interfaces:
- org.osgi.framework.BundleActivator
public class XmlParserActivator
- extends java.lang.Object
- implements org.osgi.framework.BundleActivator
OSGi BundleActivator
implementation for using XmlParser
in OSGi environments.
To retrieve an XmlParser
instance on OSGi environments get a service reference to the XmlParserOsgiFactory
.
ServiceReference reference = context.getServiceReference(XmlParserOsgiFactory.class.getName());
if (reference == null)
throw new XmlParserInitializationException("ServiceReference not found");
XmlParserOsgiFactory factory = (XmlParserOsgiFactory) context.getService(reference);
ServiceReference reference = context.getServiceReference(XmlParserOsgiFactory.class.getName());
if (reference == null)
throw new XmlParserInitializationException("ServiceReference not found");
XmlParserOsgiFactory factory = (XmlParserOsgiFactory) context.getService(reference);
XmlParser parser = factory.newParserInstance();
ResourceResolver resolver = factory.newResourceResolverInstance();
- Since:
- 0.0.5
- Author:
- noctarius
Method Summary |
void |
start(org.osgi.framework.BundleContext context)
|
void |
stop(org.osgi.framework.BundleContext context)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XmlParserActivator
public XmlParserActivator()
start
public void start(org.osgi.framework.BundleContext context)
throws java.lang.Exception
- Specified by:
start
in interface org.osgi.framework.BundleActivator
- Throws:
java.lang.Exception
stop
public void stop(org.osgi.framework.BundleContext context)
throws java.lang.Exception
- Specified by:
stop
in interface org.osgi.framework.BundleActivator
- Throws:
java.lang.Exception
Copyright © 2010. All Rights Reserved.