org.jboss.osgi.testing.internal
Class RemoteRuntime

java.lang.Object
  extended by org.jboss.osgi.testing.internal.OSGiRuntimeImpl
      extended by org.jboss.osgi.testing.internal.RemoteRuntime
All Implemented Interfaces:
OSGiRuntime

public class RemoteRuntime
extends OSGiRuntimeImpl

A remote implementation of the OSGiRuntime

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

Constructor Summary
RemoteRuntime(OSGiRuntimeHelper helper)
           
 
Method Summary
 void deploy(String location)
           
 OSGiBundle getBundle(long bundleId)
          Get the OSGiBundle for a given bundle id.
 OSGiBundle[] getBundles()
          Get the array of installed OSGiBundles
 MBeanServerConnection getMBeanServer()
          Get the MBeanServerConnection for this OSGiRuntime
 OSGiServiceReference getServiceReference(String clazz)
          Returns a ServiceReference object for a service that implements and was registered under the specified class.
 OSGiServiceReference[] getServiceReferences(String clazz, String filter)
          Returns an array of ServiceReference objects.
 boolean isRemoteRuntime()
          Return true if this OSGiRuntime connects to a remote Framework.
 void shutdown()
          Shutdown the OSGiRuntime.
 void undeploy(String location)
           
 
Methods inherited from class org.jboss.osgi.testing.internal.OSGiRuntimeImpl
addCapability, getBundle, getBundleStateMBean, getClipboardMBean, getFrameworkMBean, getInitialContext, getMBeanProxy, getPackageStateMBean, getServerHost, getServiceReference, getServiceStateMBean, getTestHelper, installBundle, installBundle, installBundle, removeCapability
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteRuntime

public RemoteRuntime(OSGiRuntimeHelper helper)
Method Detail

isRemoteRuntime

public boolean isRemoteRuntime()
Description copied from interface: OSGiRuntime
Return true if this OSGiRuntime connects to a remote Framework.


deploy

public void deploy(String location)
            throws Exception
Throws:
Exception

undeploy

public void undeploy(String location)
              throws Exception
Throws:
Exception

getBundles

public OSGiBundle[] getBundles()
Description copied from interface: OSGiRuntime
Get the array of installed OSGiBundles


getBundle

public OSGiBundle getBundle(long bundleId)
Description copied from interface: OSGiRuntime
Get the OSGiBundle for a given bundle id.

Returns:
The bundle or null if there is none

getServiceReference

public OSGiServiceReference getServiceReference(String clazz)
Description copied from interface: OSGiRuntime
Returns a ServiceReference object for a service that implements and was registered under the specified class.

Returns:
A ServiceReference object, or null if no services are registered which implement the named class.

getServiceReferences

public OSGiServiceReference[] getServiceReferences(String clazz,
                                                   String filter)
Description copied from interface: OSGiRuntime
Returns an array of ServiceReference objects. The returned array of ServiceReference objects contains services that were registered under the specified class and match the specified filter criteria.


getMBeanServer

public MBeanServerConnection getMBeanServer()
Description copied from interface: OSGiRuntime
Get the MBeanServerConnection for this OSGiRuntime


shutdown

public void shutdown()
Description copied from interface: OSGiRuntime
Shutdown the OSGiRuntime. This will remove all installed OSGiBundles and added Capability.

Specified by:
shutdown in interface OSGiRuntime
Overrides:
shutdown in class OSGiRuntimeImpl


Copyright © 2010. All Rights Reserved.