org.osgi.jmx.codec
Class OSGiBundleEvent

java.lang.Object
  extended by org.osgi.jmx.codec.OSGiBundleEvent

public class OSGiBundleEvent
extends java.lang.Object

Author:
Hal Hildebrand Date: Nov 24, 2008 Time: 2:22:34 PM

This class represents the CODEC for the composite data representing a OSGi BundleEvent

It serves as both the documentation of the type structure and as the codification of the mechanism to convert to/from the CompositeData.

The structure of the composite data is:

Identifier long
location String
SymbolicName String
EventType int

Field Summary
static javax.management.openmbean.CompositeType BUNDLE_EVENT
          The CompositeType representation of the event
 
Constructor Summary
OSGiBundleEvent(org.osgi.framework.BundleEvent event)
          Construct an OSGiBundleEvent from the supplied BundleEvent
OSGiBundleEvent(javax.management.openmbean.CompositeData data)
          Construct an OSGiBundleEvent from the CompositeData representing the event
OSGiBundleEvent(long bundleId, java.lang.String location, java.lang.String symbolicName, int eventType)
          Construct the OSGiBundleEvent
 
Method Summary
 javax.management.openmbean.CompositeData asCompositeData()
          Answer the receiver encoded as CompositeData
 long getBundleId()
           
 int getEventType()
           
 java.lang.String getLocation()
           
 java.lang.String getSymbolicName()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUNDLE_EVENT

public static final javax.management.openmbean.CompositeType BUNDLE_EVENT
The CompositeType representation of the event

Constructor Detail

OSGiBundleEvent

public OSGiBundleEvent(org.osgi.framework.BundleEvent event)
Construct an OSGiBundleEvent from the supplied BundleEvent

Parameters:
event - - the event to represent

OSGiBundleEvent

public OSGiBundleEvent(javax.management.openmbean.CompositeData data)
Construct an OSGiBundleEvent from the CompositeData representing the event

Parameters:
data - - the CompositeData representing the event.

OSGiBundleEvent

public OSGiBundleEvent(long bundleId,
                       java.lang.String location,
                       java.lang.String symbolicName,
                       int eventType)
Construct the OSGiBundleEvent

Parameters:
bundleId -
location -
symbolicName -
eventType -
Method Detail

asCompositeData

public javax.management.openmbean.CompositeData asCompositeData()
Answer the receiver encoded as CompositeData

Returns:
the CompositeData encoding of the receiver.

getBundleId

public long getBundleId()
Returns:
the identifier of the bundle for this event

getEventType

public int getEventType()
Returns:
the type of the event

getLocation

public java.lang.String getLocation()
Returns:
the location of the bundle for this event

getSymbolicName

public java.lang.String getSymbolicName()
Returns:
the symbolic name of the bundle for this event


Copyright © 2009. All Rights Reserved.