org.jboss.osgi.testing
Class OSGiTestHelper

java.lang.Object
  extended by org.jboss.osgi.testing.OSGiTestHelper

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
 org.jboss.virtual.VirtualFile assembleBundle(java.lang.String name, java.lang.String[] resources, java.lang.Class<?>... packages)
           
 org.jboss.virtual.VirtualFile assembleBundle(java.lang.String name, java.lang.String resource, java.lang.Class<?>... packages)
           
 void assertBundleLoadClass(Bundle bundle, java.lang.String expClazz, boolean success)
           
 void assertBundleState(int expState, int wasState)
           
 OSGiBootstrapProvider getBootstrapProvider()
           
 OSGiRuntime getDefaultRuntime()
           
 OSGiRuntime getEmbeddedRuntime()
           
 java.lang.String getFramework()
           
 javax.naming.InitialContext getInitialContext()
           
 OSGiRuntime getRemoteRuntime()
           
 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 getServerHost()
           
 java.lang.String getTargetContainer()
           
 java.io.File getTestArchiveFile(java.lang.String archive)
          Try to discover the File for the deployment archive
 java.lang.String getTestArchivePath(java.lang.String archive)
          Try to discover the absolute path for the deployment archive
 java.net.URL getTestArchiveURL(java.lang.String archive)
          Try to discover the URL for the deployment archive
 void ungetBootstrapProvider()
           
 
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

getBootstrapProvider

public OSGiBootstrapProvider getBootstrapProvider()

ungetBootstrapProvider

public void ungetBootstrapProvider()

getDefaultRuntime

public OSGiRuntime getDefaultRuntime()

getEmbeddedRuntime

public OSGiRuntime getEmbeddedRuntime()

getRemoteRuntime

public OSGiRuntime getRemoteRuntime()

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


getTestArchiveURL

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


getTestArchivePath

public java.lang.String getTestArchivePath(java.lang.String archive)
Try to discover the absolute path for the deployment archive


getTestArchiveFile

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


getInitialContext

public javax.naming.InitialContext getInitialContext()
                                              throws javax.naming.NamingException
Throws:
javax.naming.NamingException

getServerHost

public java.lang.String getServerHost()

getTargetContainer

public java.lang.String getTargetContainer()

getFramework

public java.lang.String getFramework()

assembleBundle

public org.jboss.virtual.VirtualFile assembleBundle(java.lang.String name,
                                                    java.lang.String resource,
                                                    java.lang.Class<?>... packages)
                                             throws java.lang.Exception
Throws:
java.lang.Exception

assembleBundle

public org.jboss.virtual.VirtualFile assembleBundle(java.lang.String name,
                                                    java.lang.String[] resources,
                                                    java.lang.Class<?>... packages)
                                             throws java.lang.Exception
Throws:
java.lang.Exception

assertBundleState

public void assertBundleState(int expState,
                              int wasState)

assertBundleLoadClass

public void assertBundleLoadClass(Bundle bundle,
                                  java.lang.String expClazz,
                                  boolean success)


Copyright © 2009. All Rights Reserved.