Nuxeo Enterprise Platform 5.4

org.nuxeo.osgi.jboss
Class JBossOSGiAdapter

java.lang.Object
  extended by org.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended by org.jboss.system.ServiceMBeanSupport
          extended by org.jboss.system.ListenerServiceMBeanSupport
              extended by org.nuxeo.osgi.jboss.JBossOSGiAdapter
All Implemented Interfaces:
java.util.EventListener, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, javax.management.NotificationListener, org.jboss.kernel.spi.dependency.KernelControllerContextAware, org.jboss.system.ListenerServiceMBean, org.jboss.system.Service, org.jboss.system.ServiceMBean, JBossOSGiAdapterMBean

public class JBossOSGiAdapter
extends org.jboss.system.ListenerServiceMBeanSupport
implements JBossOSGiAdapterMBean

This service is a singleton (you must not deploy several times a service using this implementation).

If you need to use this service inside multiple EARs you must use isolated class loaders.

Author:
Bogdan Stefanescu

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jboss.system.ListenerServiceMBeanSupport
org.jboss.system.ListenerServiceMBeanSupport.SubscriptionInfo
 
Field Summary
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
SERVICE_CONTROLLER_SIG
 
Fields inherited from interface org.jboss.system.ListenerServiceMBean
SL_FILTER_ELEMENT, SL_FILTER_FACTORY_ATTRIBUTE, SL_MBEAN_ELEMENT, SL_MBEAN_HANDBACK_ATTRIBUTE, SL_MBEAN_NAME_ATTRIBUTE, SL_NOTIFICATION_ELEMENT, SL_NOTIFICATION_TYPE_ATTRIBUTE, SL_ROOT_ELEMENT
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
JBossOSGiAdapter()
           
 
Method Summary
static org.jboss.deployment.DeploymentInfo getEARDeployment()
          Gets the EAR deployment or null if no parent EAR was found.
 java.lang.String getHomeLocation()
           
static JBossOSGiAdapter getInstance()
          This method is safe only when using isolated EARs if there are multiple nuxeo EARs in the system.
 OSGiAdapter getOSGi()
           
 void handleNotification2(javax.management.Notification notification, java.lang.Object handback)
          Handles notification.
 BundleImpl installBundle(java.lang.String symbolicName, org.jboss.deployment.DeploymentInfo di)
           
 java.lang.String listBundles()
           
 void uninstallBundle(java.lang.String symbolicName, org.jboss.deployment.DeploymentInfo di)
           
 
Methods inherited from class org.jboss.system.ListenerServiceMBeanSupport
getSubscriptions, handleNotification, setSubscriptionList, setSubscriptions, subscribe, subscribe, subscribe, unsubscribe
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, destroy, getDeploymentInfo, getLog, getName, getServer, getServiceName, getState, getStateString, jbossInternalLifecycle, pojoCreate, pojoDestroy, pojoStart, pojoStop, postDeregister, postRegister, preDeregister, preRegister, setKernelControllerContext, start, stop, unsetKernelControllerContext
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.system.ListenerServiceMBean
setSubscriptionList
 
Methods inherited from interface org.jboss.system.ServiceMBean
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Constructor Detail

JBossOSGiAdapter

public JBossOSGiAdapter()
Method Detail

getInstance

public static JBossOSGiAdapter getInstance()
This method is safe only when using isolated EARs if there are multiple nuxeo EARs in the system.

Returns:
the instance or null if not yet instantiated

getEARDeployment

public static org.jboss.deployment.DeploymentInfo getEARDeployment()
Gets the EAR deployment or null if no parent EAR was found.

This method should be used only on single Nuxeo deployments or when using isolated class loaders for Nuxeo ears.


getOSGi

public OSGiAdapter getOSGi()

installBundle

public BundleImpl installBundle(java.lang.String symbolicName,
                                org.jboss.deployment.DeploymentInfo di)
                         throws org.osgi.framework.BundleException
Throws:
org.osgi.framework.BundleException

uninstallBundle

public void uninstallBundle(java.lang.String symbolicName,
                            org.jboss.deployment.DeploymentInfo di)
                     throws org.osgi.framework.BundleException
Throws:
org.osgi.framework.BundleException

listBundles

public java.lang.String listBundles()
Specified by:
listBundles in interface JBossOSGiAdapterMBean

getHomeLocation

public java.lang.String getHomeLocation()
Specified by:
getHomeLocation in interface JBossOSGiAdapterMBean

handleNotification2

public void handleNotification2(javax.management.Notification notification,
                                java.lang.Object handback)
Handles notification.

Overrides:
handleNotification2 in class org.jboss.system.ListenerServiceMBeanSupport

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.