org.jboss.osgi.spi.testing
Class OSGiBundle

java.lang.Object
  extended by org.jboss.osgi.spi.testing.OSGiBundle

public abstract class OSGiBundle
extends java.lang.Object

An abstraction of an OSGi Bundle.

Since:
25-Sep-2008
Author:
Thomas.Diesler@jboss.org

Constructor Summary
OSGiBundle()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
          Return true if symbolic name and version are equal
abstract  long getBundleId()
          Returns this bundle's unique identifier.
abstract  java.util.Dictionary<java.lang.String,java.lang.String> getHeaders()
          Returns this bundle's Manifest headers and values.
abstract  java.lang.String getProperty(java.lang.String key)
          Returns the value of the specified property.
abstract  int getState()
          Returns this bundle's current state.
abstract  java.lang.String getSymbolicName()
          Returns the symbolic name of this bundle as specified by its Bundle-SymbolicName manifest header.
abstract  Version getVersion()
          Returns the version of this bundle.
 int hashCode()
          Returns the hash code for this bundle.
abstract  void start()
          Starts this bundle.
abstract  void stop()
          Stops this bundle.
 java.lang.String toString()
          Returns the string representation of this bundle
abstract  void uninstall()
          Uninstalls this bundle.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OSGiBundle

public OSGiBundle()
Method Detail

getBundleId

public abstract long getBundleId()
Returns this bundle's unique identifier.


getSymbolicName

public abstract java.lang.String getSymbolicName()
Returns the symbolic name of this bundle as specified by its Bundle-SymbolicName manifest header.


getVersion

public abstract Version getVersion()
Returns the version of this bundle.


getHeaders

public abstract java.util.Dictionary<java.lang.String,java.lang.String> getHeaders()
Returns this bundle's Manifest headers and values.


getState

public abstract int getState()
Returns this bundle's current state.


getProperty

public abstract java.lang.String getProperty(java.lang.String key)
Returns the value of the specified property.


start

public abstract void start()
                    throws BundleException
Starts this bundle.

Throws:
BundleException

stop

public abstract void stop()
                   throws BundleException
Stops this bundle.

Throws:
BundleException

uninstall

public abstract void uninstall()
                        throws BundleException
Uninstalls this bundle.

Throws:
BundleException

equals

public boolean equals(java.lang.Object obj)
Return true if symbolic name and version are equal

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Returns the hash code for this bundle.

Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Returns the string representation of this bundle

Overrides:
toString in class java.lang.Object


Copyright © 2009. All Rights Reserved.