Class K8SRequest
java.lang.Object
de.iip_ecosphere.platform.ecsRuntime.kubernetes.proxy.K8SRequest
Details of the K8S (Kubernetes) request.
- Author:
- Ahmad Alamoush, SSE
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]convertBase64StringToByte(String requestBase64String) convert the request from base64 String to array of bytes.convertBase64StringToString(String requestBase64String) convert the String from base64 String to request as String.convertByteArrayToBase64String(byte[] byteArray) convert the array of bytes to Base64 String.convert the request array of byte to base64 String.convert the request to base64 String with ID.Returns the headers of the request.Returns the method of the request.getPath()Returns the path of the request.get the path without parameters.byte[]Returns the payload of the request.Returns the protocol of the request.byte[]Returns the request as bytes.voidsetHeaders(Map<String, String[]> headers) Set the headers of the request.voidSet the method of the request.voidSet the path of the request.voidsetPayload(byte[] payload) Set the payload of the request.voidsetProtocol(String protocol) Set the protocol of the request.voidsetRequestByte(byte[] requestByte) Set the request as bytes.
-
Field Details
-
requestByte
private byte[] requestByte -
method
-
path
-
protocol
-
payload
private byte[] payload -
headers
-
-
Constructor Details
-
K8SRequest
public K8SRequest()Creates a K8S Request instance.
-
-
Method Details
-
getRequestByte
public byte[] getRequestByte()Returns the request as bytes.- Returns:
- the request as bytes
-
setRequestByte
public void setRequestByte(byte[] requestByte) Set the request as bytes.- Parameters:
requestByte- the request as bytes
-
getMethod
Returns the method of the request.- Returns:
- the method of the request
-
setMethod
Set the method of the request.- Parameters:
method- the method of the request
-
getPath
Returns the path of the request.- Returns:
- the path of the request
-
setPath
Set the path of the request.- Parameters:
path- the path of the request
-
getProtocol
Returns the protocol of the request.- Returns:
- the protocol of the request
-
setProtocol
Set the protocol of the request.- Parameters:
protocol- the protocol of the request
-
getPayload
public byte[] getPayload()Returns the payload of the request.- Returns:
- the payload of the request
-
setPayload
public void setPayload(byte[] payload) Set the payload of the request.- Parameters:
payload- the payload of the request
-
getHeaders
Returns the headers of the request.- Returns:
- the headers of the request
-
setHeaders
Set the headers of the request.- Parameters:
headers- the headers of the request
-
convertToBase64String
convert the request array of byte to base64 String.- Returns:
- the request as base64 String
-
convertBase64StringToByte
convert the request from base64 String to array of bytes.- Parameters:
requestBase64String- the request as base64 String- Returns:
- requestString the request as array of bytes
-
convertToBase64StringWithID
convert the request to base64 String with ID.- Returns:
- the request as base64 String with ID
-
convertBase64StringToString
convert the String from base64 String to request as String.- Parameters:
requestBase64String- the request as base64 String- Returns:
- textString the request as string
-
convertByteArrayToBase64String
convert the array of bytes to Base64 String.- Parameters:
byteArray- the request as array of bytes- Returns:
- byteArrayBase64String the request as base64 String
-
getPathNoParameter
get the path without parameters.- Returns:
- requestString the request as array of bytes
-