org.jboss.osgi.spi.junit
Class OSGiTestHelper

java.lang.Object
  extended by org.jboss.osgi.spi.junit.OSGiTestHelper
Direct Known Subclasses:
IntegrationTestHelper

public class OSGiTestHelper
extends java.lang.Object

An OSGi Test Helper

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

Constructor Summary
OSGiTestHelper()
           
 
Method Summary
 OSGiBootstrapProvider createBootstrapProvider()
           
 OSGiBootstrapProvider getBootstrapProvider()
           
 java.io.File getResourceFile(java.lang.String resource)
          Try to discover the File for the test resource
 java.net.URL getResourceURL(java.lang.String resource)
          Try to discover the URL for the test resource
 java.lang.String getTestArchiveDir()
           
 java.io.File getTestArchiveFile(java.lang.String archive)
          Try to discover the File for the deployment archive
 java.net.URL getTestArchiveURL(java.lang.String archive)
          Try to discover the URL for the deployment archive
 java.lang.String getTestResourcesDir()
           
 org.osgi.framework.Bundle installBundle(org.osgi.framework.BundleContext sysContext, java.lang.String bundlePath, boolean start)
           
 void setBootstrapProvider(OSGiBootstrapProvider bootProvider)
           
protected  void startLogEntryTracking(LogEntryCache logEntryCache)
           
protected  void stopLogEntryTracking()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OSGiTestHelper

public OSGiTestHelper()
Method Detail

createBootstrapProvider

public OSGiBootstrapProvider createBootstrapProvider()

getBootstrapProvider

public OSGiBootstrapProvider getBootstrapProvider()

setBootstrapProvider

public void setBootstrapProvider(OSGiBootstrapProvider bootProvider)

startLogEntryTracking

protected void startLogEntryTracking(LogEntryCache logEntryCache)
                              throws java.lang.Exception
Throws:
java.lang.Exception

stopLogEntryTracking

protected void stopLogEntryTracking()
                             throws java.lang.Exception
Throws:
java.lang.Exception

getResourceURL

public java.net.URL getResourceURL(java.lang.String resource)
Try to discover the URL for the test resource


getResourceFile

public java.io.File getResourceFile(java.lang.String resource)
Try to discover the File for the test resource


getTestResourcesDir

public java.lang.String getTestResourcesDir()

getTestArchiveURL

public java.net.URL getTestArchiveURL(java.lang.String archive)
Try to discover the URL for the deployment archive


getTestArchiveFile

public java.io.File getTestArchiveFile(java.lang.String archive)
Try to discover the File for the deployment archive


getTestArchiveDir

public java.lang.String getTestArchiveDir()

installBundle

public org.osgi.framework.Bundle installBundle(org.osgi.framework.BundleContext sysContext,
                                               java.lang.String bundlePath,
                                               boolean start)
                                        throws org.osgi.framework.BundleException
Throws:
org.osgi.framework.BundleException


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.