Class DefaultContainerSetup
java.lang.Object
org.apache.fulcrum.yaafi.container.DefaultContainerSetup
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the configuration file name for the container should use for this test.int
Gets the parameter file name for the container should use for this test.Gets the role file name for the container should use for this test.Returns an instance of the named component.void
Releases the component.void
setConfigurationFileName
(String configurationFileName) Gets the configuration file name for the container should use for this test.void
setContainerType
(String containerType) void
setLogLevel
(int logLevel) Set the console logger levelvoid
setRoleFileName
(String roleFileName) Override the role file name for the container should use for this test.void
tearDown()
Clean up container.
-
Field Details
-
CONTAINER_YAAFI
- See Also:
-
COMPONENT_APP_ROOT
Key used in the context for defining the application root- See Also:
-
defaultLogLevel
public static final int defaultLogLevelUse INFO for ConsoleLogger- See Also:
-
attributes
Hash map to store attributes for the test -
maxInactiveInterval
public int maxInactiveIntervalset the Max inactive interval
-
-
Constructor Details
-
DefaultContainerSetup
public DefaultContainerSetup()Constructor- Throws:
IOException
-
-
Method Details
-
setConfigurationFileName
Gets the configuration file name for the container should use for this test. By default it is src/test/TestComponentConfig.- Parameters:
configurationFileName
- the location of the config file
-
setRoleFileName
Override the role file name for the container should use for this test. By default it is src/test/TestRoleConfig.- Parameters:
roleFileName
- location of the role file
-
setLogLevel
public void setLogLevel(int logLevel) Set the console logger level- Parameters:
logLevel
- set valid logging level- See Also:
-
getLogLevel
public int getLogLevel() -
tearDown
public void tearDown()Clean up container. -
getConfigurationFileName
Gets the configuration file name for the container should use for this test.- Returns:
- The filename of the configuration file
-
getRoleFileName
Gets the role file name for the container should use for this test.- Returns:
- The filename of the role configuration file
-
getParameterFileName
Gets the parameter file name for the container should use for this test.- Returns:
- The filename of the role configuration file
-
lookup
public Object lookup(String roleName) throws org.apache.avalon.framework.component.ComponentException Returns an instance of the named component. This method will also start the container if it has not been started already- Parameters:
roleName
- Name of the role the component fills.- Returns:
- instance of the component
- Throws:
org.apache.avalon.framework.component.ComponentException
- generic exception
-
release
Releases the component.- Parameters:
component
- component to be released
-
getContainerType
- Returns:
- the container type
-
setContainerType
- Parameters:
containerType
- container type to set
-