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
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumstatic enum -
Method Summary
Modifier and TypeMethodDescriptionvoidbuild()Build the complete JVM server including the profile zOS UNIX file and the CICS resource definition.voidBuild and install the CICS JVMSERVER resource definitionvoidBuild the JVM server profile zOS UNIX file onlyvoidBuild the CICS JVMSERVER resource definition onlyvoidSave a checkpoint of the current state of the JVM server logsvoidDelete the JVM server logsvoiddelete()Delete the CICS JVMSERVER resource including it's zOS UNIX files and directories.voiddelete(boolean ignoreErrors) Delete the CICS JVMSERVER resource including it's zOS UNIX files and directories.booleandisable()Disable the CICS JVMSERVER resourcebooleandisable(IJvmserver.PurgeType purgeType) Disable the CICS JVMSERVER resource with a specificIJvmserver.PurgeTypebooleandisable(IJvmserver.PurgeType purgeType, int timeout) Disable the CICS JVMSERVER resource with a specificIJvmserver.PurgeTypeand specified timeoutvoiddisableDiscardDelete(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.voiddiscard()Discard the CICS JVMSERVER resource.voidenable()Enable the CICS JVMSERVER resourceConvenience method that returns the JAVA_HOME as defined in the JVM ProfileGet aListof 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 valueintReturn the CICS JVMSERVER resource THREADLIMIT attribute valueReturns the JVM server STDERRReturns the JVM server STDOUTintGet the JVMSERVER Threadcount value form CEMT, i.e the number of threads in useintGet the JVMSERVER Threadlimit value from CEMTConvenience method that returns the WORK_DIR as defined in the JVM ProfilevoidInstall the CICS JVMSERVER resource definitionbooleanReturns whether the CICS JVMSERVER resource is currently enabledbooleanChecks if the JVM profile has been builtbooleanCheck if the CICS JVMSERVER resource definition exist via CEDA DISPLAYbooleanCheck if the CICS JVMSERVER resource has been installed via CEMT INQUIREvoidStore the content of the JVM server logs to the default location in the Results Archive StorevoidsaveToResultsArchive(String rasPath) Store the content of the JVM server logs to the Results Archive StorevoidSet the CICS JVMSERVER resource definition DESCRIPTION attribute valuevoidSet the CICS JVMSERVER resource definition STATUS attribute valuevoidsetLibertyServer(IZosLibertyServer zosLibertyServer) Sets the zOS Liberty server object associated with this JVM servervoidsetResourceDefinitionLerunoptsAttribute(String lerunopts) Set the CICS JVMSERVER resource LERUNOPTS attribute valuevoidsetResourceDefinitionThreadlimitAttribute(int threadlimit) Set the CICS JVMSERVER resource THREADLIMIT attribute valuevoidsetShouldArchive(boolean shouldArchive) Set flag to control if the JVM server should be automatically stored to the test output.voidsetShouldCleanup(boolean shouldCleanup) Set flag to control if the JVM server should be automatically purged from zOS.voidsetThreadLimit(int threadlimit) Set the JVMSERVER Threadlimit value in CEMTbooleanReturn flag that controls if the JVM server should be automatically stored to the test outputbooleanReturn flag that controls if the JVM server should be automatically purged from zOSbooleanWait for the CICS JVMSERVER resource to be disabled.booleanwaitForDisable(int timeout) Wait for the CICS JVMSERVER resource to be disabled with specified timeout.booleanWait for the CICS JVMSERVER resource to be enabled.booleanwaitForEnable(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.PurgeTypeand 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.PurgeTypelevels (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.PurgeTypeat which the disable was successful - Throws:
CicsJvmserverResourceException
-
disableWithEscalate
Disable the CICS JVMSERVER resource. This method will escalate through all theIJvmserver.PurgeTypelevels (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.PurgeTypeat 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- theIZosLibertyServerobject to associate with this JVM server
-
getLibertyServer
IZosLibertyServer getLibertyServer()Returns the zOS Liberty server object associated with this JVM server- Returns:
- the
IZosLibertyServerassociated 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 aListof 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
-