public class ReplaceableService<T>
extends org.ops4j.pax.swissbox.lifecycle.AbstractLifecycle
| Constructor and Description |
|---|
ReplaceableService(org.osgi.framework.BundleContext context,
Class<T> serviceClass)
Creates a new replaceable service without a listener.
|
ReplaceableService(org.osgi.framework.BundleContext context,
Class<T> serviceClass,
ReplaceableServiceListener<T> listener)
Creates a new replaceable service.
|
| Modifier and Type | Method and Description |
|---|---|
T |
getService()
Returne the current service.
|
protected void |
onStart()
Creates a service collection and starts it.
|
protected void |
onStop()
Stops the service collection and releases resources.
|
public ReplaceableService(org.osgi.framework.BundleContext context,
Class<T> serviceClass)
context - bundle contextserviceClass - class of the replaceable servicepublic ReplaceableService(org.osgi.framework.BundleContext context,
Class<T> serviceClass,
ReplaceableServiceListener<T> listener)
context - bundle contextserviceClass - class of the replaceable servicelistener - a listenerpublic T getService()
protected void onStart()
onStart in class org.ops4j.pax.swissbox.lifecycle.AbstractLifecycleAbstractLifecycle.onStart()protected void onStop()
onStop in class org.ops4j.pax.swissbox.lifecycle.AbstractLifecycleAbstractLifecycle.onStop()Copyright © 2006–2015 OPS4J - Open Participation Software for Java. All rights reserved.