|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TestContainer
Management of an OSGi framework that can be used as a integration test container.
Method Summary | ||
---|---|---|
|
getService(java.lang.Class<T> serviceType)
|
|
|
getService(java.lang.Class<T> serviceType,
long timeoutInMillis)
|
|
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. |
Method Detail |
---|
<T> T getService(java.lang.Class<T> serviceType) throws TestContainerException
TestContainerException
<T> T getService(java.lang.Class<T> serviceType, long timeoutInMillis) throws TestContainerException
TestContainerException
long installBundle(java.lang.String bundleUrl) throws TestContainerException
TestContainerException
long installBundle(java.lang.String bundleLocation, byte[] bundle) throws TestContainerException
TestContainerException
void startBundle(long bundleId) throws TestContainerException
TestContainerException
void setBundleStartLevel(long bundleId, int startLevel) throws TestContainerException
bundleId
- bundle idstartLevel
- start level
TestContainerException
- if startlevel cannot be setvoid start() throws TimeoutException
TimeoutException
- - if timeout occured and the test container cannot be startedvoid stop() throws TimeoutException
TimeoutException
- - if timeout occured and the test container cannot be stoppedvoid waitForState(long bundleId, int state, long timeoutInMillis) throws TimeoutException
bundleId
- bundle idstate
- expected statetimeoutInMillis
- max time to wait for state
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 |