public class OnmsServiceManagerImpl extends Object implements OnmsServiceManager
| Constructor and Description | 
|---|
OnmsServiceManagerImpl(org.osgi.framework.BundleContext bundleContext)  | 
| Modifier and Type | Method and Description | 
|---|---|
VaadinApplicationContext | 
createApplicationContext(VaadinApplicationContextCreator creator)  | 
EventRegistry | 
getEventRegistry()  | 
<T> T | 
getService(Class<T> clazz,
          VaadinApplicationContext applicationContext)
Returns a service in session-scope. 
 | 
<T> List<T> | 
getServices(Class<T> clazz,
           VaadinApplicationContext applicationContext,
           Hashtable<String,Object> additionalProperties)
Returns all registered services within session-scope and may be consider additional Properties. 
 | 
<T> void | 
registerAsService(Class<T> serviceClass,
                 T serviceBean,
                 VaadinApplicationContext applicationContext)
Register a service with session scope. 
 | 
<T> void | 
registerAsService(Class<T> serviceClass,
                 T serviceBean,
                 VaadinApplicationContext applicationContext,
                 Dictionary<String,Object> properties)
Registers a service with session scope but allows to set additional Properties. 
 | 
void | 
sessionDestroyed(String sessionId)
Remove all services from OSGi-container for the destroyed session. 
 | 
void | 
sessionInitialized(String sessionId)  | 
public OnmsServiceManagerImpl(org.osgi.framework.BundleContext bundleContext)
public <T> void registerAsService(Class<T> serviceClass, T serviceBean, VaadinApplicationContext applicationContext)
OnmsServiceManagerregisterAsService in interface OnmsServiceManagerserviceBean - The service to be registered. Must not be null.applicationContext - The session scope. Must not be null.public <T> void registerAsService(Class<T> serviceClass, T serviceBean, VaadinApplicationContext applicationContext, Dictionary<String,Object> properties)
OnmsServiceManagerregisterAsService in interface OnmsServiceManagerserviceBean - The service to be registered. Must not be null.applicationContext - the session scope. Must not be null.properties - Additional Properties. Must not be null.public EventRegistry getEventRegistry()
getEventRegistry in interface OnmsServiceManagerpublic <T> T getService(Class<T> clazz, VaadinApplicationContext applicationContext)
OnmsServiceManagergetService in interface OnmsServiceManagerclazz - The type of the service. Must not be null.applicationContext - The session-scope. Must not be null.public <T> List<T> getServices(Class<T> clazz, VaadinApplicationContext applicationContext, Hashtable<String,Object> additionalProperties)
OnmsServiceManagergetServices in interface OnmsServiceManagerclazz - the type of the service. Must not be null.applicationContext - The session scope. Must not be null.additionalProperties - optional additional propeties. Must not be null.public void sessionInitialized(String sessionId)
sessionInitialized in interface SessionListenerpublic void sessionDestroyed(String sessionId)
sessionDestroyed in interface SessionListenerpublic VaadinApplicationContext createApplicationContext(VaadinApplicationContextCreator creator)
createApplicationContext in interface OnmsServiceManagerCopyright © 2020. All rights reserved.