|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ops4j.pax.exam.rbc.client.RemoteBundleContextClient
public class RemoteBundleContextClient
A RemoteBundleContext
client, that takes away RMI handling.
Constructor Summary | |
---|---|
RemoteBundleContextClient(java.lang.Integer rmiPort,
long rmiLookupTimeout)
Constructor. |
Method Summary | ||
---|---|---|
java.lang.Integer |
getRmiPort()
Getter. |
|
|
getService(java.lang.Class<T> serviceType)
|
|
|
getService(java.lang.Class<T> serviceType,
long timeoutInMillis)
Returns a dynamic proxy in place of the actual service, forwarding the calls via the remote bundle context. |
|
long |
installBundle(java.lang.String bundleUrl)
|
|
long |
installBundle(java.lang.String bundleLocation,
byte[] bundle)
|
|
void |
setBundleStartLevel(long bundleId,
int startLevel)
Sets the start level for a bundle. |
|
void |
start()
Starts the test container. |
|
void |
startBundle(long bundleId)
|
|
void |
stop()
Stops the test container. |
|
void |
waitForState(long bundleId,
int state,
long timeoutInMillis)
Waits for a bundle to be in a certain state and returns. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RemoteBundleContextClient(java.lang.Integer rmiPort, long rmiLookupTimeout)
rmiPort
- RMI communication port (cannot be null)rmiLookupTimeout
- timeout for looking up the remote bundle context via RMI (cannot be null)Method Detail |
---|
public <T> T getService(java.lang.Class<T> serviceType)
getService
in interface TestContainer
public <T> T getService(java.lang.Class<T> serviceType, long timeoutInMillis)
getService
in interface TestContainer
public long installBundle(java.lang.String bundleUrl)
installBundle
in interface TestContainer
public long installBundle(java.lang.String bundleLocation, byte[] bundle) throws TestContainerException
installBundle
in interface TestContainer
TestContainerException
public void startBundle(long bundleId) throws TestContainerException
startBundle
in interface TestContainer
TestContainerException
public void setBundleStartLevel(long bundleId, int startLevel) throws TestContainerException
setBundleStartLevel
in interface TestContainer
bundleId
- bundle idstartLevel
- start level
TestContainerException
- if startlevel cannot be setpublic void start()
start
in interface TestContainer
public void stop()
stop
in interface TestContainer
public void waitForState(long bundleId, int state, long timeoutInMillis) throws TimeoutException
waitForState
in interface TestContainer
bundleId
- bundle idstate
- expected statetimeoutInMillis
- max time to wait for state
TimeoutException
- - if timeout occured and expected state has not being reachedpublic java.lang.Integer getRmiPort()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |