|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RemoteBundleContext
Remote BundleContext like access.
Field Summary | |
---|---|
static long |
NO_WAIT
Timeout specifing that there should be no waiting. |
static long |
WAIT_FOREVER
Timeout specifing that it should wait forever. |
Method Summary | |
---|---|
long |
installBundle(java.lang.String bundleUrl)
Installs a bundle remotly. |
long |
installBundle(java.lang.String bundleLocation,
byte[] bundle)
Installs a bundle remotly given the bundle content. |
java.lang.Object |
remoteCall(java.lang.Class<?> serviceType,
java.lang.String methodName,
java.lang.Class<?>[] methodParamTypes,
long timeoutInMillis,
java.lang.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 |
waitForState(long bundleId,
int state,
long timeoutInMillis)
Waits for a bundle to be in a certain state and returns. |
Field Detail |
---|
static final long NO_WAIT
static final long WAIT_FOREVER
Method Detail |
---|
java.lang.Object remoteCall(java.lang.Class<?> serviceType, java.lang.String methodName, java.lang.Class<?>[] methodParamTypes, long timeoutInMillis, java.lang.Object... actualParams) throws java.rmi.RemoteException, NoSuchServiceException, java.lang.NoSuchMethodException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
serviceType
- service class of the remote servicemethodName
- method namemethodParamTypes
- method parameters typestimeoutInMillis
- timeout for looking up the serviceactualParams
- actual parameters (must match the given method params)
NoSuchServiceException
- - If a service of the specified type cannot be located
java.lang.NoSuchMethodException
- - If the given method cannot be found
java.lang.IllegalAccessException
- - Specified method cannot be accessed
java.lang.reflect.InvocationTargetException
- - Wraps an eventual exception occured during method invocation
java.rmi.RemoteException
- - Remote communication related exception (mandatory by RMI)long installBundle(java.lang.String bundleUrl) throws java.rmi.RemoteException, org.osgi.framework.BundleException
bundleUrl
- url of the bundle to be installed. The url must be accessible from the remote OSGi container.
java.rmi.RemoteException
- - Remote communication related exception (mandatory by RMI)
org.osgi.framework.BundleException
- - Re-thrown from installing the bundlelong installBundle(java.lang.String bundleLocation, byte[] bundle) throws java.rmi.RemoteException, org.osgi.framework.BundleException
bundleLocation
- bundle locationbundle
- bundle content as a byte array
java.rmi.RemoteException
- - Remote communication related exception (mandatory by RMI)
org.osgi.framework.BundleException
- - Re-thrown from installing the bundlevoid startBundle(long bundleId) throws java.rmi.RemoteException, org.osgi.framework.BundleException
bundleId
- id of the bundle to be started
java.rmi.RemoteException
- - Remote communication related exception (mandatory by RMI)
org.osgi.framework.BundleException
- - Re-thrown from starting the bundlevoid stopBundle(long bundleId) throws java.rmi.RemoteException, org.osgi.framework.BundleException
bundleId
- id of the bundle to be stopped
java.rmi.RemoteException
- - Remote communication related exception (mandatory by RMI)
org.osgi.framework.BundleException
- - Re-thrown from stopping the bundlevoid setBundleStartLevel(long bundleId, int startLevel) throws java.rmi.RemoteException, org.osgi.framework.BundleException
bundleId
- id of the bundle to which the start level should be setstartLevel
- bundle start level
java.rmi.RemoteException
- - Remote communication related exception (mandatory by RMI)
org.osgi.framework.BundleException
- - If bundle level cannot be setvoid waitForState(long bundleId, int state, long timeoutInMillis) throws java.rmi.RemoteException, org.osgi.framework.BundleException, TimeoutException
bundleId
- bundle idstate
- expected statetimeoutInMillis
- max time to wait for state
java.rmi.RemoteException
- - Remote communication related exception (mandatory by RMI)
org.osgi.framework.BundleException
- - If bundle cannot be found
TimeoutException
- - if timeout occured and expected state has not being reached
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |