Package dev.galasa.cicsts.cicsresource
Interface IJvmserver
public interface IJvmserver
Represents a CICS JVM server resource. It provides methods to set JVM server specific attributes on the resource
(via CEDA) and to manage and set attributes in CEMT. Methods are provided to manage the logs associated with the JVM server.
JVM profile options should be managed via the IJvmprofile
JVM profile object
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
static enum
-
Method Summary
Modifier and TypeMethodDescriptionvoid
build()
Build the complete JVM server including the profile zOS UNIX file and the CICS resource definition.void
Build and install the CICS JVMSERVER resource definitionvoid
Build the JVM server profile zOS UNIX file onlyvoid
Build the CICS JVMSERVER resource definition onlyvoid
Save a checkpoint of the current state of the JVM server logsvoid
Delete the JVM server logsvoid
delete()
Delete the CICS JVMSERVER resource including it's zOS UNIX files and directories.void
delete
(boolean ignoreErrors) Delete the CICS JVMSERVER resource including it's zOS UNIX files and directories.boolean
disable()
Disable the CICS JVMSERVER resourceboolean
disable
(IJvmserver.PurgeType purgeType) Disable the CICS JVMSERVER resource with a specificIJvmserver.PurgeType
boolean
disable
(IJvmserver.PurgeType purgeType, int timeout) Disable the CICS JVMSERVER resource with a specificIJvmserver.PurgeType
and specified timeoutvoid
disableDiscardDelete
(boolean ignoreErrors) Disable and discard the CICS JVMSERVER resource and delete the resource definition.Disable the CICS JVMSERVER resource.disableWithEscalate
(int stepTimeout) Disable the CICS JVMSERVER resource.void
discard()
Discard the CICS JVMSERVER resource.void
enable()
Enable the CICS JVMSERVER resourceConvenience method that returns the JAVA_HOME as defined in the JVM ProfileGet aList
of Java log files, i.e Snap.*.trc, javacore.*.txt etc.Returns the JVM server JVMLOGReturn the JVM profile for this JVM serverReturns the JVM server JVMTRACEReturns the zOS Liberty server object associated with this JVM servergetName()
Returns the JVM server name as defined in the CICS Resource DefinitionReturn the CICS JVMSERVER resource definition DESCRIPTION attribute valueReturn the CICS JVMSERVER resource definition GROUP attribute valueReturn the CICS JVMSERVER resource JVMPROFILE attribute valueReturn the CICS JVMSERVER resource LERUNOPTS attribute valueReturn the CICS JVMSERVER resource definition NAME attribute valueReturn the CICS JVMSERVER resource definition STATUS attribute valueint
Return the CICS JVMSERVER resource THREADLIMIT attribute valueReturns the JVM server STDERRReturns the JVM server STDOUTint
Get the JVMSERVER Threadcount value form CEMT, i.e the number of threads in useint
Get the JVMSERVER Threadlimit value from CEMTConvenience method that returns the WORK_DIR as defined in the JVM Profilevoid
Install the CICS JVMSERVER resource definitionboolean
Returns whether the CICS JVMSERVER resource is currently enabledboolean
Checks if the JVM profile has been builtboolean
Check if the CICS JVMSERVER resource definition exist via CEDA DISPLAYboolean
Check if the CICS JVMSERVER resource has been installed via CEMT INQUIREvoid
Store the content of the JVM server logs to the default location in the Results Archive Storevoid
saveToResultsArchive
(String rasPath) Store the content of the JVM server logs to the Results Archive Storevoid
Set the CICS JVMSERVER resource definition DESCRIPTION attribute valuevoid
Set the CICS JVMSERVER resource definition STATUS attribute valuevoid
setLibertyServer
(IZosLibertyServer zosLibertyServer) Sets the zOS Liberty server object associated with this JVM servervoid
setResourceDefinitionLerunoptsAttribute
(String lerunopts) Set the CICS JVMSERVER resource LERUNOPTS attribute valuevoid
setResourceDefinitionThreadlimitAttribute
(int threadlimit) Set the CICS JVMSERVER resource THREADLIMIT attribute valuevoid
setShouldArchive
(boolean shouldArchive) Set flag to control if the JVM server should be automatically stored to the test output.void
setShouldCleanup
(boolean shouldCleanup) Set flag to control if the JVM server should be automatically purged from zOS.void
setThreadLimit
(int threadlimit) Set the JVMSERVER Threadlimit value in CEMTboolean
Return flag that controls if the JVM server should be automatically stored to the test outputboolean
Return flag that controls if the JVM server should be automatically purged from zOSboolean
Wait for the CICS JVMSERVER resource to be disabled.boolean
waitForDisable
(int timeout) Wait for the CICS JVMSERVER resource to be disabled with specified timeout.boolean
Wait for the CICS JVMSERVER resource to be enabled.boolean
waitForEnable
(int timeout) Wait for the CICS JVMSERVER resource to be enabled with specified timeout.
-
Method Details
-
setDefinitionDescriptionAttribute
Set the CICS JVMSERVER resource definition DESCRIPTION attribute value- Parameters:
value
- the resource definition DESCRIPTION attribute value
-
setDefinitionStatusAttribute
Set the CICS JVMSERVER resource definition STATUS attribute value- Parameters:
value
- the resource definition STATUS attribute value
-
setResourceDefinitionLerunoptsAttribute
Set the CICS JVMSERVER resource LERUNOPTS attribute value- Parameters:
lerunopts
- the resource LERUNOPTS attribute value
-
setResourceDefinitionThreadlimitAttribute
void setResourceDefinitionThreadlimitAttribute(int threadlimit) Set the CICS JVMSERVER resource THREADLIMIT attribute value- Parameters:
threadlimit
- the resource THREADLIMIT attribute value
-
getResourceDefinitionNameAttribute
String getResourceDefinitionNameAttribute()Return the CICS JVMSERVER resource definition NAME attribute value- Returns:
- the resource definition NAME attribute value
-
getResourceDefinitionGroupAttribute
String getResourceDefinitionGroupAttribute()Return the CICS JVMSERVER resource definition GROUP attribute value- Returns:
- the resource definition GROUP attribute value
-
getResourceDefinitionDescriptionAttribute
String getResourceDefinitionDescriptionAttribute()Return the CICS JVMSERVER resource definition DESCRIPTION attribute value- Returns:
- the resource definition DESCRIPTION attribute value
-
getResourceDefinitionStatusAttribute
CicsResourceStatus getResourceDefinitionStatusAttribute()Return the CICS JVMSERVER resource definition STATUS attribute value- Returns:
- the resource definition STATUS attribute value
-
getResourceDefinitionJvmprofileAttribute
String getResourceDefinitionJvmprofileAttribute()Return the CICS JVMSERVER resource JVMPROFILE attribute value- Returns:
- the resource JVMPROFILE attribute value
-
getResourceDefinitionLerunoptsAttribute
String getResourceDefinitionLerunoptsAttribute()Return the CICS JVMSERVER resource LERUNOPTS attribute value- Returns:
- the resource LERUNOPTS attribute value
-
getResourceDefinitionThreadlimitAttribute
int getResourceDefinitionThreadlimitAttribute()Return the CICS JVMSERVER resource THREADLIMIT attribute value- Returns:
- the resource THREADLIMIT attribute value
-
buildResourceDefinition
Build the CICS JVMSERVER resource definition only- Throws:
CicsJvmserverResourceException
-
buildInstallResourceDefinition
Build and install the CICS JVMSERVER resource definition- Throws:
CicsJvmserverResourceException
-
installResourceDefinition
Install the CICS JVMSERVER resource definition- Throws:
CicsJvmserverResourceException
-
resourceDefined
Check if the CICS JVMSERVER resource definition exist via CEDA DISPLAY- Throws:
CicsJvmserverResourceException
-
resourceInstalled
Check if the CICS JVMSERVER resource has been installed via CEMT INQUIRE- Throws:
CicsJvmserverResourceException
-
enable
Enable the CICS JVMSERVER resource- Throws:
CicsJvmserverResourceException
-
waitForEnable
Wait for the CICS JVMSERVER resource to be enabled. Does NOT issue the enable command- Returns:
- true if enabled, false if not enabled
- Throws:
CicsJvmserverResourceException
-
waitForEnable
Wait for the CICS JVMSERVER resource to be enabled with specified timeout. Does NOT issue the enable command- Parameters:
timeout
- timeout in seconds- Returns:
- true if enabled, false if not enabled
- Throws:
CicsJvmserverResourceException
-
isEnabled
Returns whether the CICS JVMSERVER resource is currently enabled- Returns:
- true if enabled, false if not enabled
- Throws:
CicsJvmserverResourceException
-
disable
Disable the CICS JVMSERVER resource- Returns:
- true if disabled, false if not disabled
- Throws:
CicsJvmserverResourceException
-
disable
Disable the CICS JVMSERVER resource with a specificIJvmserver.PurgeType
- Parameters:
purgeType
-- Returns:
- true if the resource disables within the time, false otherwise
- Throws:
CicsJvmserverResourceException
-
disable
Disable the CICS JVMSERVER resource with a specificIJvmserver.PurgeType
and specified timeout- Parameters:
purgeType
-timeout
- timeout in seconds- Returns:
- true if the resource disables within the time, false otherwise
- Throws:
CicsJvmserverResourceException
-
disableWithEscalate
Disable the CICS JVMSERVER resource. This method will escalate through all theIJvmserver.PurgeType
levels (PHASEOUT, PURGE, FORCEPURGE, KILL) as necessary. If the disable at any level is not successful within the default timeout, escalation will happen- Returns:
- the
IJvmserver.PurgeType
at which the disable was successful - Throws:
CicsJvmserverResourceException
-
disableWithEscalate
Disable the CICS JVMSERVER resource. This method will escalate through all theIJvmserver.PurgeType
levels (PHASEOUT, PURGE, FORCEPURGE, KILL) as necessary. If the disable at any level is not successful within the stepTimeout, escalation will happen- Parameters:
stepTimeout
- time in seconds to allow each step to disable before escalating- Returns:
- the
IJvmserver.PurgeType
at which the disable was successful - Throws:
CicsJvmserverResourceException
-
waitForDisable
Wait for the CICS JVMSERVER resource to be disabled. Does NOT issue the disable command- Returns:
- true if disabled, false if not disabled
- Throws:
CicsJvmserverResourceException
-
waitForDisable
Wait for the CICS JVMSERVER resource to be disabled with specified timeout. Does NOT issue the disable command- Parameters:
timeout
- timeout in seconds- Returns:
- true if disabled, false if not disabled
- Throws:
CicsJvmserverResourceException
-
delete
Delete the CICS JVMSERVER resource including it's zOS UNIX files and directories. If the resource is installed, it will be disabled and discarded- Throws:
CicsJvmserverResourceException
-
delete
Delete the CICS JVMSERVER resource including it's zOS UNIX files and directories. If the resource is installed, it will be disabled and discarded. Errors during the process will cause an exception to be thrown depending on the value of ignoreErrors- Parameters:
ignoreErrors
-- Throws:
CicsJvmserverResourceException
-
discard
Discard the CICS JVMSERVER resource. If the resource is enabled, it will be disabled and discarded- Throws:
CicsJvmserverResourceException
-
disableDiscardDelete
Disable and discard the CICS JVMSERVER resource and delete the resource definition. Errors during the process will cause an exception to be thrown depending on the value of ignoreErrors- Parameters:
ignoreErrors
-- Throws:
CicsJvmserverResourceException
-
setThreadLimit
Set the JVMSERVER Threadlimit value in CEMT- Parameters:
threadlimit
- max number of threads used by the JVM server- Throws:
CicsJvmserverResourceException
-
getThreadLimit
Get the JVMSERVER Threadlimit value from CEMT- Returns:
- the Threadlimit value
- Throws:
CicsJvmserverResourceException
-
getThreadCount
Get the JVMSERVER Threadcount value form CEMT, i.e the number of threads in use- Returns:
- the Threadcount value
- Throws:
CicsJvmserverResourceException
-
build
Build the complete JVM server including the profile zOS UNIX file and the CICS resource definition. This method will install the CICS resource and wait for it to become enabled- Throws:
CicsJvmserverResourceException
-
getJvmprofile
IJvmprofile getJvmprofile()Return the JVM profile for this JVM server- Returns:
- the JVM profile object
-
buildProfile
Build the JVM server profile zOS UNIX file only- Throws:
CicsJvmserverResourceException
-
isProfileBuilt
boolean isProfileBuilt()Checks if the JVM profile has been built- Returns:
- Boolean
-
setLibertyServer
Sets the zOS Liberty server object associated with this JVM server- Parameters:
zosLibertyServer
- theIZosLibertyServer
object to associate with this JVM server
-
getLibertyServer
IZosLibertyServer getLibertyServer()Returns the zOS Liberty server object associated with this JVM server- Returns:
- the
IZosLibertyServer
associated with this JVM server
-
getName
String getName()Returns the JVM server name as defined in the CICS Resource Definition- Returns:
- the JVM server name
-
getJavaHome
Convenience method that returns the JAVA_HOME as defined in the JVM Profile- Returns:
- the JAVA_HOME value
- Throws:
CicsJvmserverResourceException
-
getWorkingDirectory
Convenience method that returns the WORK_DIR as defined in the JVM Profile- Returns:
- the WORK_DIR value
- Throws:
CicsJvmserverResourceException
-
getJvmLog
Returns the JVM server JVMLOG- Returns:
- JVMLOG
IJvmserverLog
- Throws:
CicsJvmserverResourceException
-
getStdOut
Returns the JVM server STDOUT- Returns:
- STDOUT
IJvmserverLog
- Throws:
CicsJvmserverResourceException
-
getStdErr
Returns the JVM server STDERR- Returns:
- STDERR
IJvmserverLog
- Throws:
CicsJvmserverResourceException
-
getJvmTrace
Returns the JVM server JVMTRACE- Returns:
- JVMTRACE
IJvmserverLog
- Throws:
CicsJvmserverResourceException
-
checkpointLogs
Save a checkpoint of the current state of the JVM server logs- Throws:
CicsJvmserverResourceException
-
getJavaLogs
Get aList
of Java log files, i.e Snap.*.trc, javacore.*.txt etc.- Returns:
- Throws:
CicsJvmserverResourceException
-
saveToResultsArchive
Store the content of the JVM server logs to the default location in the Results Archive Store- Throws:
CicsJvmserverResourceException
-
saveToResultsArchive
Store the content of the JVM server logs to the Results Archive Store- Parameters:
rasPath
- path in Results Archive Store- Throws:
CicsJvmserverResourceException
-
clearJvmLogs
Delete the JVM server logs- Throws:
CicsJvmserverResourceException
-
setShouldArchive
void setShouldArchive(boolean shouldArchive) Set flag to control if the JVM server should be automatically stored to the test output. Defaults to true -
shouldArchive
boolean shouldArchive()Return flag that controls if the JVM server should be automatically stored to the test output -
setShouldCleanup
void setShouldCleanup(boolean shouldCleanup) Set flag to control if the JVM server should be automatically purged from zOS. Defaults to true -
shouldCleanup
boolean shouldCleanup()Return flag that controls if the JVM server should be automatically purged from zOS
-