public interface RemoteBundleContext extends Remote
TODO: this is probably somewhat too fluffy (too shaky interface) - improve here
| Modifier and Type | Field and Description |
|---|---|
static long |
NO_WAIT
Timeout specifing that there should be no waiting.
|
static long |
WAIT_FOREVER
Timeout specifing that it should wait forever.
|
| Modifier and Type | Method and Description |
|---|---|
long |
installBundle(String bundleUrl)
Installs a bundle remotly.
|
long |
installBundle(String bundleLocation,
byte[] bundle)
Installs a bundle remotly given the bundle content.
|
Object |
remoteCall(Class<?> serviceType,
String methodName,
Class<?>[] methodParamTypes,
String filter,
org.ops4j.pax.exam.RelativeTimeout timeout,
Object... actualParams)
Makes a remote call on a service.
|
void |
setBundleStartLevel(long bundleId,
int startLevel)
Sets bundle start level.
|
void |
startBundle(long bundleId)
Starts a bundle.
|
void |
stopBundle(long bundleId)
Stops a bundle.
|
void |
uninstallBundle(long id) |
void |
waitForState(long bundleId,
int state,
org.ops4j.pax.exam.RelativeTimeout timeout)
Waits for a bundle to be in a certain state and returns.
|
static final long NO_WAIT
static final long WAIT_FOREVER
Object remoteCall(Class<?> serviceType, String methodName, Class<?>[] methodParamTypes, String filter, org.ops4j.pax.exam.RelativeTimeout timeout, Object... actualParams) throws RemoteException, NoSuchServiceException, NoSuchMethodException, IllegalAccessException, InvocationTargetException
serviceType - service class of the remote servicemethodName - method namemethodParamTypes - method parameters typesfilter - service filtertimeout - timeout for looking up the serviceactualParams - actual parameters (must match the given method params)NoSuchServiceException - - If a service of the specified type cannot be locatedNoSuchMethodException - - If the given method cannot be foundIllegalAccessException - - Specified method cannot be accessedInvocationTargetException - - Wraps an eventual exception occured during method invocationRemoteException - - Remote communication related exception (mandatory by RMI)long installBundle(String bundleUrl) throws RemoteException, org.osgi.framework.BundleException
bundleUrl - url of the bundle to be installed. The url must be accessible from the remote OSGi
container.RemoteException - - Remote communication related exception (mandatory by RMI)org.osgi.framework.BundleException - - Re-thrown from installing the bundlelong installBundle(String bundleLocation, byte[] bundle) throws RemoteException, org.osgi.framework.BundleException
bundleLocation - bundle locationbundle - bundle content as a byte arrayRemoteException - - Remote communication related exception (mandatory by RMI)org.osgi.framework.BundleException - - Re-thrown from installing the bundlevoid startBundle(long bundleId)
throws RemoteException,
org.osgi.framework.BundleException
bundleId - id of the bundle to be startedRemoteException - - Remote communication related exception (mandatory by RMI)org.osgi.framework.BundleException - - Re-thrown from starting the bundlevoid stopBundle(long bundleId)
throws RemoteException,
org.osgi.framework.BundleException
bundleId - id of the bundle to be stoppedRemoteException - - Remote communication related exception (mandatory by RMI)org.osgi.framework.BundleException - - Re-thrown from stopping the bundlevoid setBundleStartLevel(long bundleId,
int startLevel)
throws RemoteException,
org.osgi.framework.BundleException
bundleId - id of the bundle to which the start level should be setstartLevel - bundle start levelRemoteException - - Remote communication related exception (mandatory by RMI)org.osgi.framework.BundleException - - If bundle level cannot be setvoid waitForState(long bundleId,
int state,
org.ops4j.pax.exam.RelativeTimeout timeout)
throws RemoteException,
org.osgi.framework.BundleException
bundleId - bundle idstate - expected statetimeout - max time to wait for stateRemoteException - - Remote communication related exception (mandatory by RMI)org.osgi.framework.BundleException - - If bundle cannot be foundorg.ops4j.pax.exam.TimeoutException - - if timeout occured and expected state has not being reachedvoid uninstallBundle(long id)
throws RemoteException,
org.osgi.framework.BundleException
id - of bundle to uninstallRemoteException - - Remote communication related exception (mandatory by RMI)org.osgi.framework.BundleException - - If bundle cannot be foundCopyright © 2006–2018 OPS4J - Open Participation Software for Java. All rights reserved.