Package dev.galasa.zosmf
Interface IZosmf
public interface IZosmf
Represents a zOSMF server
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Enumeration of zOSMF Custom HTTP headersstatic enum
Enumeration of zOSMF request types -
Method Summary
Modifier and TypeMethodDescriptionvoid
Clear the existing HTTP Headers ready for the next zOSMF request@NotNull IZosmfResponse
Issue an HTTP DELETE request to the zOSMF server with no request body@NotNull IZosmfResponse
Issue an HTTP PUT request to the zOSMF server with no request bodygetImage()
Get the zOS image associated with the zOSMF server@NotNull IZosmfResponse
Issue an HTTP POST request to the zOSMF server with a request body of content type ofapplication/json
@NotNull IZosmfResponse
Issue an HTTP PUT request to the zOSMF server with a request body of content type oftext/plain
@NotNull IZosmfResponse
Issue an HTTP PUT request to the zOSMF server with a request body of content type ofapplication/json
@NotNull IZosmfResponse
Issue an HTTP PUT request to the zOSMF server with a request body of content type oftext/plain
@NotNull com.google.gson.JsonObject
Return the JSON response from the zOSMF Server Information requestvoid
Set an HTTP Header for the pending zOSMF request
-
Method Details
-
setHeader
Set an HTTP Header for the pending zOSMF request- Parameters:
name
- header namevalue
- header value
-
clearHeaders
void clearHeaders()Clear the existing HTTP Headers ready for the next zOSMF request -
get
@NotNull @NotNull IZosmfResponse get(String path, List<Integer> validStatusCodes, boolean convert) throws ZosmfException Issue an HTTP PUT request to the zOSMF server with no request body- Parameters:
path
- identifies the zOSMF REST APIvalidStatusCodes
- aList
of acceptable HTTP Status codes. Default toHttpStatus.SC_OK
when nullconvert
- is a data conversion required. If true, data will be converted betwen EBCDIC to ISO8859-1. If false, no data conversion will take place.- Returns:
- the zOSMF server response
- Throws:
ZosmfException
-
postJson
@NotNull @NotNull IZosmfResponse postJson(String path, com.google.gson.JsonObject requestBody, List<Integer> validStatusCodes) throws ZosmfException Issue an HTTP POST request to the zOSMF server with a request body of content type ofapplication/json
- Parameters:
path
- identifies the zOSMF REST APIrequestBody
- the request bodyvalidStatusCodes
- aList
of acceptable HTTP Status codes. Default toHttpStatus.SC_OK
when null- Returns:
- the zOSMF server response
- Throws:
ZosmfException
-
putText
@NotNull @NotNull IZosmfResponse putText(String path, String requestBody, List<Integer> validStatusCodes) throws ZosmfException Issue an HTTP PUT request to the zOSMF server with a request body of content type oftext/plain
- Parameters:
path
- identifies the zOSMF REST APIrequestBody
- the request bodyvalidStatusCodes
- aList
of acceptable HTTP Status codes. Default toHttpStatus.SC_OK
when null- Returns:
- the zOSMF server response
- Throws:
ZosmfException
-
putJson
@NotNull @NotNull IZosmfResponse putJson(String path, com.google.gson.JsonObject body, List<Integer> validStatusCodes) throws ZosmfException Issue an HTTP PUT request to the zOSMF server with a request body of content type ofapplication/json
- Parameters:
path
- identifies the zOSMF REST APIbody
- the request bodyvalidStatusCodes
- aList
of acceptable HTTP Status codes. Default toHttpStatus.SC_OK
when null- Returns:
- the zOSMF server response
- Throws:
ZosmfException
-
putBinary
@NotNull @NotNull IZosmfResponse putBinary(String path, byte[] body, List<Integer> validStatusCodes) throws ZosmfException Issue an HTTP PUT request to the zOSMF server with a request body of content type oftext/plain
- Parameters:
path
- identifies the zOSMF REST APIbody
- the request bodyvalidStatusCodes
- aList
of acceptable HTTP Status codes. Default toHttpStatus.SC_OK
when null- Returns:
- the zOSMF server response
- Throws:
ZosmfException
-
delete
@NotNull @NotNull IZosmfResponse delete(String path, List<Integer> validStatusCodes) throws ZosmfException Issue an HTTP DELETE request to the zOSMF server with no request body- Parameters:
path
- identifies the zOSMF REST APIvalidStatusCodes
- aList
of acceptable HTTP Status codes. Default toHttpStatus.SC_OK
when null- Returns:
- the zOSMF server response
- Throws:
ZosmfException
-
serverInfo
Return the JSON response from the zOSMF Server Information request- Returns:
- the RSE API server JSON response
- Throws:
RseapiException
ZosmfException
-
getImage
IZosImage getImage()Get the zOS image associated with the zOSMF server- Returns:
- the zOS image
-