public abstract class ServerContainer
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.util.HashMap<java.lang.String,java.lang.String> |
cacheProperties |
java.io.File |
cacheXMLFile |
java.lang.String |
DEFAULT_CONF_DIR |
static java.lang.String |
DEFAULT_CONFIG_DIR |
static java.lang.String |
DEFAULT_LOG_DIR |
static java.lang.String |
DEFAULT_LOGGING_LEVEL |
java.lang.String |
description |
java.io.File |
gemfireLogFile |
java.io.File |
logDir |
static org.apache.logging.log4j.Logger |
logger |
java.lang.String |
loggingLevel |
java.util.HashMap<java.lang.String,java.lang.String> |
systemProperties |
Constructor and Description |
---|
ServerContainer(ContainerInstall install,
java.io.File containerConfigHome,
java.lang.String containerDescriptors)
Sets up the container using the given installation
Sets up a bunch of logging files, default locations, and container properties.
|
Modifier and Type | Method and Description |
---|---|
void |
cleanUp()
Copies the container configuration (found through
getConfiguration() ) to the logging
directory specified by logDir |
void |
deployWar()
|
void |
dumpLogs() |
java.lang.String |
generateUniqueContainerDescription(java.lang.String extraIdentifiers)
Generates a unique, mostly human readable, description string of the container using the
installation's description, extraIdentifiers, and the current system nano time
|
java.lang.String |
getCacheProperty(java.lang.String name) |
org.codehaus.cargo.container.configuration.LocalConfiguration |
getConfiguration() |
org.codehaus.cargo.container.InstalledLocalContainer |
getContainer() |
ContainerInstall |
getInstall() |
java.lang.String |
getLoggingLevel() |
java.lang.String |
getPort()
Get the basic port for the container
Calls
getPort() with the ServletPropertySet.PORT option. |
java.lang.String |
getPort(java.lang.String portType)
The container's port for the specified port type
|
java.lang.String |
getRMIPort()
Get the RMI port for the container
Calls
getPort() with the GeneralPropertySet.RMI_PORT option. |
org.codehaus.cargo.container.State |
getState() |
java.lang.String |
getSystemProperty(java.lang.String name) |
java.io.File |
getWarFile() |
java.lang.String |
setCacheProperty(java.lang.String name,
java.lang.String value)
Set a geode session replication property
|
void |
setCacheXMLFile(java.io.File cacheXMLFile)
Sets the container's cache XML file
|
void |
setLocator(java.lang.String address,
int port)
Sets the container's locator
Sets the two variables
locatorAddress and locatorPort . |
void |
setLoggingLevel(java.lang.String loggingLevel)
set the container's logging level
|
java.lang.String |
setSystemProperty(java.lang.String name,
java.lang.String value)
Set geode distributed system property
|
void |
setWarFile(java.io.File warFile)
Sets the war file for this container to deploy and use
|
void |
start()
Starts this cargo container by picking the container's ports (RMI, AJP, and regular) and
calling the cargo container's start function
|
void |
stop()
Stops this cargo container
|
java.lang.String |
toString()
Human readable description of the container
|
abstract void |
writeSettings()
Called before each container startup
This is mainly used to write properties to whatever format they need to be in for a given
container before the container is started.
|
public java.lang.String description
public java.io.File gemfireLogFile
public java.io.File cacheXMLFile
public java.io.File logDir
public java.lang.String loggingLevel
public java.util.HashMap<java.lang.String,java.lang.String> cacheProperties
public java.util.HashMap<java.lang.String,java.lang.String> systemProperties
public final java.lang.String DEFAULT_CONF_DIR
public static final java.lang.String DEFAULT_LOGGING_LEVEL
public static final java.lang.String DEFAULT_LOG_DIR
public static final java.lang.String DEFAULT_CONFIG_DIR
public static final org.apache.logging.log4j.Logger logger
public ServerContainer(ContainerInstall install, java.io.File containerConfigHome, java.lang.String containerDescriptors) throws java.io.IOException
container
variable.containerConfigHome
- The folder that the container configuration folder should be setup
incontainerDescriptors
- A string of extra descriptors for the container used in the
containers description
java.io.IOException
public java.lang.String generateUniqueContainerDescription(java.lang.String extraIdentifiers)
public void deployWar()
public void start()
public void stop()
public void dumpLogs() throws java.io.IOException
java.io.IOException
public void cleanUp() throws java.io.IOException
getConfiguration()
) to the logging
directory specified by logDir
java.io.IOException
public void setLocator(java.lang.String address, int port) throws java.io.IOException
locatorAddress
and locatorPort
. Also calls the
updateLocator()
function to write the updated locator properties to the file.java.io.IOException
public void setCacheXMLFile(java.io.File cacheXMLFile) throws java.io.IOException
java.io.IOException
public java.lang.String setCacheProperty(java.lang.String name, java.lang.String value) throws java.io.IOException
java.io.IOException
public java.lang.String setSystemProperty(java.lang.String name, java.lang.String value) throws java.io.IOException
java.io.IOException
public void setWarFile(java.io.File warFile)
public void setLoggingLevel(java.lang.String loggingLevel)
public org.codehaus.cargo.container.InstalledLocalContainer getContainer()
public ContainerInstall getInstall()
public java.io.File getWarFile()
public java.lang.String getLoggingLevel()
public org.codehaus.cargo.container.configuration.LocalConfiguration getConfiguration()
public org.codehaus.cargo.container.State getState()
public java.lang.String getCacheProperty(java.lang.String name)
public java.lang.String getSystemProperty(java.lang.String name)
public java.lang.String getRMIPort()
getPort()
with the GeneralPropertySet.RMI_PORT
option.public java.lang.String getPort()
getPort()
with the ServletPropertySet.PORT
option.public java.lang.String getPort(java.lang.String portType)
public abstract void writeSettings() throws java.lang.Exception
java.lang.Exception
public java.lang.String toString()
toString
in class java.lang.Object
description
variable along with the state of this container