com.oracle.osgi.jmx.core
Class ServiceState

java.lang.Object
  extended by javax.management.NotificationBroadcasterSupport
      extended by com.oracle.osgi.jmx.Monitor
          extended by com.oracle.osgi.jmx.core.ServiceState
All Implemented Interfaces:
javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, org.osgi.jmx.core.ServiceStateMBean

public class ServiceState
extends Monitor
implements org.osgi.jmx.core.ServiceStateMBean

Author:
Hal Hildebrand Date: Nov 23, 2008 Time: 5:44:14 PM

Field Summary
protected  org.osgi.framework.BundleContext bc
           
protected  org.osgi.framework.ServiceListener serviceListener
           
 
Fields inherited from class com.oracle.osgi.jmx.Monitor
objectName, sequenceNumber, server
 
Fields inherited from interface org.osgi.jmx.core.ServiceStateMBean
BUNDLE_IDENTIFIER, BUNDLE_LOCATION, EVENT_TYPE, OBJECT_CLASS, SERVICE, SERVICE_EVENT, SERVICE_EVENT_TYPE, SERVICE_ID, USING_BUNDLES
 
Constructor Summary
ServiceState(org.osgi.framework.BundleContext bc)
           
 
Method Summary
protected  void addListener()
           
 long getBundle(long serviceId)
           
 javax.management.openmbean.TabularData getProperties(long serviceId)
           
 java.lang.String[] getServiceInterfaces(long serviceId)
           
protected  org.osgi.framework.ServiceListener getServiceListener()
           
 javax.management.openmbean.TabularData getServices()
           
 long[] getUsingBundles(long serviceId)
           
protected  org.osgi.framework.ServiceReference ref(long serviceId)
           
protected  void removeListener()
           
 
Methods inherited from class com.oracle.osgi.jmx.Monitor
postDeregister, postRegister, preDeregister, preRegister
 
Methods inherited from class javax.management.NotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serviceListener

protected org.osgi.framework.ServiceListener serviceListener

bc

protected org.osgi.framework.BundleContext bc
Constructor Detail

ServiceState

public ServiceState(org.osgi.framework.BundleContext bc)
Method Detail

getBundle

public long getBundle(long serviceId)
               throws java.io.IOException
Specified by:
getBundle in interface org.osgi.jmx.core.ServiceStateMBean
Throws:
java.io.IOException

getProperties

public javax.management.openmbean.TabularData getProperties(long serviceId)
                                                     throws java.io.IOException
Specified by:
getProperties in interface org.osgi.jmx.core.ServiceStateMBean
Throws:
java.io.IOException

getServiceInterfaces

public java.lang.String[] getServiceInterfaces(long serviceId)
                                        throws java.io.IOException
Specified by:
getServiceInterfaces in interface org.osgi.jmx.core.ServiceStateMBean
Throws:
java.io.IOException

getServices

public javax.management.openmbean.TabularData getServices()
Specified by:
getServices in interface org.osgi.jmx.core.ServiceStateMBean

getUsingBundles

public long[] getUsingBundles(long serviceId)
                       throws java.io.IOException
Specified by:
getUsingBundles in interface org.osgi.jmx.core.ServiceStateMBean
Throws:
java.io.IOException

addListener

protected void addListener()
Specified by:
addListener in class Monitor

getServiceListener

protected org.osgi.framework.ServiceListener getServiceListener()

removeListener

protected void removeListener()
Specified by:
removeListener in class Monitor

ref

protected org.osgi.framework.ServiceReference ref(long serviceId)
                                           throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2009. All Rights Reserved.