Package dev.galasa.zosrseapi
Interface IRseapi
public interface IRseapi
Represents a RSE API server
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Enumeration of RSE API request types -
Method Summary
Modifier and TypeMethodDescriptionvoid
Clear the existing HTTP Headers ready for the next RSE API request@NotNull IRseapiResponse
Issue an HTTP DELETE request to the RSE API server with no request body@NotNull IRseapiResponse
Issue an HTTP PUT request to the RSE API server with no request bodygetImage()
Get the zOS image associated with the RSE API server@NotNull IRseapiResponse
Issue an HTTP POST request to the RSE API server with no request body@NotNull IRseapiResponse
Issue an HTTP POST request to the RSE API server with a request body of content type ofapplication/json
@NotNull IRseapiResponse
Issue an HTTP PUT request to the RSE API server with a request body of content type oftext/plain
@NotNull IRseapiResponse
Issue an HTTP PUT request to the RSE API server with a request body of content type ofapplication/json
@NotNull IRseapiResponse
Issue an HTTP PUT request to the RSE API server with text request bodytext/plain
@NotNull com.google.gson.JsonObject
Return the JSON response from the RSE API server Server Information requestvoid
Set an HTTP Header for the pending RSE API request
-
Method Details
-
setHeader
Set an HTTP Header for the pending RSE API request- Parameters:
name
- header namevalue
- header value
-
clearHeaders
void clearHeaders()Clear the existing HTTP Headers ready for the next RSE API request -
get
@NotNull @NotNull IRseapiResponse get(String path, List<Integer> validStatusCodes, boolean convert) throws RseapiException Issue an HTTP PUT request to the RSE API server with no request body- Parameters:
path
- identifies the RSE API REST API servervalidStatusCodes
- 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 RSE API server response
- Throws:
RseapiException
-
putText
@NotNull @NotNull IRseapiResponse putText(String path, String body, List<Integer> validStatusCodes) throws RseapiException Issue an HTTP PUT request to the RSE API server with text request bodytext/plain
- Parameters:
path
- identifies the RSE API REST API serverbody
- the request bodyvalidStatusCodes
- aList
of acceptable HTTP Status codes. Default toHttpStatus.SC_OK
when null- Returns:
- the RSE API server response
- Throws:
RseapiException
-
putJson
@NotNull @NotNull IRseapiResponse putJson(String path, com.google.gson.JsonObject body, List<Integer> validStatusCodes) throws RseapiException Issue an HTTP PUT request to the RSE API server with a request body of content type ofapplication/json
- Parameters:
path
- identifies the RSE API REST API serverbody
- the request bodyvalidStatusCodes
- aList
of acceptable HTTP Status codes. Default toHttpStatus.SC_OK
when null- Returns:
- the RSE API server response
- Throws:
RseapiException
-
putBinary
@NotNull @NotNull IRseapiResponse putBinary(String path, byte[] body, List<Integer> validStatusCodes) throws RseapiException Issue an HTTP PUT request to the RSE API server with a request body of content type oftext/plain
- Parameters:
path
- identifies the RSE API REST API serverbody
- the request bodyvalidStatusCodes
- aList
of acceptable HTTP Status codes. Default toHttpStatus.SC_OK
when null- Returns:
- the RSE API server response
- Throws:
RseapiException
-
post
@NotNull @NotNull IRseapiResponse post(String path, List<Integer> validStatusCodes) throws RseapiException Issue an HTTP POST request to the RSE API server with no request body- Parameters:
path
- identifies the RSE API REST API servervalidStatusCodes
- aList
of acceptable HTTP Status codes. Default toHttpStatus.SC_OK
when null- Returns:
- the RSE API server response
- Throws:
RseapiException
-
postJson
@NotNull @NotNull IRseapiResponse postJson(String path, com.google.gson.JsonObject requestBody, List<Integer> validStatusCodes) throws RseapiException Issue an HTTP POST request to the RSE API server with a request body of content type ofapplication/json
- Parameters:
path
- identifies the RSE API REST API serverrequestBody
- the request bodyvalidStatusCodes
- aList
of acceptable HTTP Status codes. Default toHttpStatus.SC_OK
when null- Returns:
- the RSE API server response
- Throws:
RseapiException
-
delete
@NotNull @NotNull IRseapiResponse delete(String path, List<Integer> validStatusCodes) throws RseapiException Issue an HTTP DELETE request to the RSE API server with no request body- Parameters:
path
- identifies the RSE API REST API servervalidStatusCodes
- aList
of acceptable HTTP Status codes. Default toHttpStatus.SC_OK
when null- Returns:
- the RSE API server response
- Throws:
RseapiException
-
serverInfo
Return the JSON response from the RSE API server Server Information request- Returns:
- the RSE API server JSON response
- Throws:
RseapiException
-
getImage
IZosImage getImage()Get the zOS image associated with the RSE API server- Returns:
- the zOS image
-