org.jboss.osgi.testing.internal
Class OSGiBundleImpl

java.lang.Object
  extended by org.jboss.osgi.testing.internal.OSGiBundleImpl
All Implemented Interfaces:
OSGiBundle
Direct Known Subclasses:
EmbeddedBundle

public abstract class OSGiBundleImpl
extends Object
implements OSGiBundle

An abstract implementation of a OSGiBundle

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

Method Summary
 boolean equals(Object obj)
          Return true if symbolic name and version are equal
 OSGiRuntime getRuntime()
          Get the runtime associated with this bundle.
 int hashCode()
          Returns the hash code for this bundle.
 void start()
          Starts this bundle.
protected abstract  void startInternal()
           
 void stop()
          Stops this bundle.
protected abstract  void stopInternal()
           
 String toString()
          Returns the string representation of this bundle
 void uninstall()
          Uninstalls this bundle.
protected abstract  void uninstallInternal()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.osgi.testing.OSGiBundle
getBundleId, getDataFile, getEntry, getHeaders, getHeaders, getLocation, getProperty, getResource, getState, getSymbolicName, getVersion, loadClass
 

Method Detail

getRuntime

public OSGiRuntime getRuntime()
Description copied from interface: OSGiBundle
Get the runtime associated with this bundle.

Specified by:
getRuntime in interface OSGiBundle

start

public void start()
           throws org.osgi.framework.BundleException
Starts this bundle.

Specified by:
start in interface OSGiBundle
Throws:
org.osgi.framework.BundleException

startInternal

protected abstract void startInternal()
                               throws org.osgi.framework.BundleException
Throws:
org.osgi.framework.BundleException

stop

public void stop()
          throws org.osgi.framework.BundleException
Stops this bundle.

Specified by:
stop in interface OSGiBundle
Throws:
org.osgi.framework.BundleException

stopInternal

protected abstract void stopInternal()
                              throws org.osgi.framework.BundleException
Throws:
org.osgi.framework.BundleException

uninstall

public void uninstall()
               throws org.osgi.framework.BundleException
Uninstalls this bundle.

Specified by:
uninstall in interface OSGiBundle
Throws:
org.osgi.framework.BundleException

uninstallInternal

protected abstract void uninstallInternal()
                                   throws org.osgi.framework.BundleException
Throws:
org.osgi.framework.BundleException

equals

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

Overrides:
equals in class Object

hashCode

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

Overrides:
hashCode in class Object

toString

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

Overrides:
toString in class Object


Copyright © 2010. All Rights Reserved.