Class OsgiInstanceConfig
- java.lang.Object
-
- org.apache.sling.testing.clients.osgi.OsgiInstanceConfig
-
- All Implemented Interfaces:
InstanceConfig
public class OsgiInstanceConfig extends Object implements InstanceConfig
Allows saving and restoring the OSGiConfig to be used before and after altering OSGi configurations for tests
See
InstanceConfig
-
-
Field Summary
Fields Modifier and Type Field Description protected int
waitCount
Deprecated.
-
Constructor Summary
Constructors Constructor Description OsgiInstanceConfig(T client, String configPID)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InstanceConfig
restore()
Restore the current OSGi configuration for the PID defined in the constructorInstanceConfig
save()
Save the current OSGi configuration for the PID defined in the constructor
-
-
-
Field Detail
-
waitCount
@Deprecated protected int waitCount
Deprecated.
-
-
Constructor Detail
-
OsgiInstanceConfig
public OsgiInstanceConfig(T client, String configPID) throws ClientException, InstanceConfigException, InterruptedException
- Type Parameters:
T
- The type of the Granite Client- Parameters:
client
- The Granite Client to be used internallyconfigPID
- The PID for the OSGi configuration- Throws:
ClientException
- if the client cannot be initializedInstanceConfigException
- if the config cannot be savedInterruptedException
- if interrupted
-
-
Method Detail
-
save
public InstanceConfig save() throws InstanceConfigException, InterruptedException
Save the current OSGi configuration for the PID defined in the constructor- Specified by:
save
in interfaceInstanceConfig
- Returns:
- this
- Throws:
InstanceConfigException
- if the config cannot be savedInterruptedException
- if interrupted
-
restore
public InstanceConfig restore() throws InstanceConfigException, InterruptedException
Restore the current OSGi configuration for the PID defined in the constructor- Specified by:
restore
in interfaceInstanceConfig
- Returns:
- this
- Throws:
InstanceConfigException
- if the config cannot be restoredInterruptedException
- if interrupted
-
-