Package dev.galasa.zosmf
Interface IZosmf
public interface IZosmf
Represents a zOSMF server
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumEnumeration of zOSMF Custom HTTP headersstatic enumEnumeration of zOSMF request types -
Method Summary
Modifier and TypeMethodDescriptionvoidClear the existing HTTP Headers ready for the next zOSMF request@NotNull IZosmfResponseIssue an HTTP DELETE request to the zOSMF server with no request body@NotNull IZosmfResponseIssue an HTTP PUT request to the zOSMF server with no request bodygetImage()Get the zOS image associated with the zOSMF server@NotNull IZosmfResponseIssue an HTTP POST request to the zOSMF server with a request body of content type ofapplication/json@NotNull IZosmfResponseIssue an HTTP PUT request to the zOSMF server with a request body of content type oftext/plain@NotNull IZosmfResponseIssue an HTTP PUT request to the zOSMF server with a request body of content type ofapplication/json@NotNull IZosmfResponseIssue an HTTP PUT request to the zOSMF server with a request body of content type oftext/plain@NotNull com.google.gson.JsonObjectReturn the JSON response from the zOSMF Server Information requestvoidSet 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- aListof acceptable HTTP Status codes. Default toHttpStatus.SC_OKwhen 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- aListof acceptable HTTP Status codes. Default toHttpStatus.SC_OKwhen 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- aListof acceptable HTTP Status codes. Default toHttpStatus.SC_OKwhen 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- aListof acceptable HTTP Status codes. Default toHttpStatus.SC_OKwhen 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- aListof acceptable HTTP Status codes. Default toHttpStatus.SC_OKwhen 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- aListof acceptable HTTP Status codes. Default toHttpStatus.SC_OKwhen 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:
RseapiExceptionZosmfException
-
getImage
IZosImage getImage()Get the zOS image associated with the zOSMF server- Returns:
- the zOS image
-