public abstract class AbstractLifecycleInterceptorService extends Object implements LifecycleInterceptorService
Constructor and Description |
---|
AbstractLifecycleInterceptorService() |
Modifier and Type | Method and Description |
---|---|
protected void |
addInterceptor(LifecycleInterceptor interceptor)
Add a LifecycleInterceptor to the service.
|
protected List<LifecycleInterceptor> |
getInterceptorChain() |
protected abstract InvocationContext |
getInvocationContext(Bundle bundle)
Get the InvocationContext for the given bundle.
|
void |
handleStateChange(int state,
Bundle bundle)
Invoke the registered set of interceptors for the given bundle state change.
|
protected void |
removeInterceptor(LifecycleInterceptor interceptor)
Remove an LifecycleInterceptor to the service.
|
void |
start(BundleContext context)
Start tracking
LifecycleInterceptor services |
void |
stop()
Start tracking
LifecycleInterceptor services |
public void start(BundleContext context)
LifecycleInterceptorService
LifecycleInterceptor
servicesstart
in interface LifecycleInterceptorService
public void stop()
LifecycleInterceptorService
LifecycleInterceptor
servicesstop
in interface LifecycleInterceptorService
protected void addInterceptor(LifecycleInterceptor interceptor)
interceptor
- The interceptorprotected void removeInterceptor(LifecycleInterceptor interceptor)
interceptor
- The interceptorprotected List<LifecycleInterceptor> getInterceptorChain()
public void handleStateChange(int state, Bundle bundle)
handleStateChange
in interface LifecycleInterceptorService
state
- The future state of the bundlebundle
- The bundle that changes stateLifecycleInterceptorException
- if the invocation of an interceptor failsprotected abstract InvocationContext getInvocationContext(Bundle bundle)
Copyright © 2013 JBoss by Red Hat. All Rights Reserved.