| org.ops4j.pax.exam.rbc.internal.RemoteBundleContext |
Known Indirect Subclasses
|
Class Overview
Remote BundleContext like access.
TODO: this is probably somwhat too fluffy (too shaky interface) - improve here
Summary
| Constants |
| long |
NO_WAIT |
Timeout specifing that there should be no waiting. |
| long |
WAIT_FOREVER |
Timeout specifing that it should wait forever. |
| Public Methods |
|
abstract
long
|
installBundle(String bundleUrl)
Installs a bundle remotly.
|
|
abstract
long
|
installBundle(String bundleLocation, byte[] bundle)
Installs a bundle remotly given the bundle content.
|
|
abstract
Object
|
remoteCall(Class<?> serviceType, String methodName, Class[]<?> methodParamTypes, String filter, RelativeTimeout timeout, Object... actualParams)
Makes a remote call on a service.
|
|
abstract
void
|
setBundleStartLevel(long bundleId, int startLevel)
Sets bundle start level.
|
|
abstract
void
|
startBundle(long bundleId)
Starts a bundle.
|
|
abstract
void
|
stopBundle(long bundleId)
Stops a bundle.
|
|
abstract
void
|
uninstallBundle(long id)
|
|
abstract
void
|
waitForState(long bundleId, int state, RelativeTimeout timeout)
Waits for a bundle to be in a certain state and returns.
|
Constants
public
static
final
long
NO_WAIT
Timeout specifing that there should be no waiting.
Constant Value:
0
(0x0000000000000000)
public
static
final
long
WAIT_FOREVER
Timeout specifing that it should wait forever.
Constant Value:
9223372036854775807
(0x7fffffffffffffff)
Public Methods
public
abstract
long
installBundle
(String bundleUrl)
Installs a bundle remotly.
Parameters
| bundleUrl
| url of the bundle to be installed. The url must be accessible from the remote OSGi container. |
Returns
- bundle id of the installed bundle
Throws
| RemoteException
| - Remote communication related exception (mandatory by RMI) |
| BundleException
| - Re-thrown from installing the bundle
|
public
abstract
long
installBundle
(String bundleLocation, byte[] bundle)
Installs a bundle remotly given the bundle content.
Parameters
| bundleLocation
| bundle location |
| bundle
| bundle content as a byte array |
Returns
- bundle id of the installed bundle
Throws
| RemoteException
| - Remote communication related exception (mandatory by RMI) |
| BundleException
| - Re-thrown from installing the bundle
|
public
abstract
Object
remoteCall
(Class<?> serviceType, String methodName, Class[]<?> methodParamTypes, String filter, RelativeTimeout timeout, Object... actualParams)
Makes a remote call on a service.
Parameters
| serviceType
| service class of the remote service |
| methodName
| method name |
| methodParamTypes
| method parameters types |
| timeout
| timeout for looking up the service |
| actualParams
| actual parameters (must match the given method params) |
Throws
| NoSuchServiceException
| - If a service of the specified type cannot be located |
| NoSuchMethodException
| - If the given method cannot be found |
| IllegalAccessException
| - Specified method cannot be accessed |
| InvocationTargetException
| - Wraps an eventual exception occured during method invocation |
| RemoteException
| - Remote communication related exception (mandatory by RMI)
|
public
abstract
void
setBundleStartLevel
(long bundleId, int startLevel)
Parameters
| bundleId
| id of the bundle to which the start level should be set |
| startLevel
| bundle start level |
Throws
| RemoteException
| - Remote communication related exception (mandatory by RMI) |
| BundleException
| - If bundle level cannot be set
|
public
abstract
void
startBundle
(long bundleId)
Parameters
| bundleId
| id of the bundle to be started |
Throws
| RemoteException
| - Remote communication related exception (mandatory by RMI) |
| BundleException
| - Re-thrown from starting the bundle
|
public
abstract
void
stopBundle
(long bundleId)
Parameters
| bundleId
| id of the bundle to be stopped |
Throws
| RemoteException
| - Remote communication related exception (mandatory by RMI) |
| BundleException
| - Re-thrown from stopping the bundle
|
public
abstract
void
uninstallBundle
(long id)
Parameters
| id
| of bundle to uninstall |
Throws
| RemoteException
| - Remote communication related exception (mandatory by RMI) |
| BundleException
| - If bundle cannot be found
|
public
abstract
void
waitForState
(long bundleId, int state, RelativeTimeout timeout)
Waits for a bundle to be in a certain state and returns.
Parameters
| bundleId
| bundle id |
| state
| expected state |
Throws
| RemoteException
| - Remote communication related exception (mandatory by RMI) |
| BundleException
| - If bundle cannot be found |
| TimeoutException
| - if timeout occured and expected state has not being reached
|