java.lang.Object
de.iip_ecosphere.platform.ecsRuntime.kubernetes.proxy.K8SRequest

public class K8SRequest extends Object
Details of the K8S (Kubernetes) request.
Author:
Ahmad Alamoush, SSE
  • Field Details

    • requestByte

      private byte[] requestByte
    • method

      private String method
    • path

      private String path
    • protocol

      private String protocol
    • payload

      private byte[] payload
    • headers

      private Map<String,String[]> 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

      public String getMethod()
      Returns the method of the request.
      Returns:
      the method of the request
    • setMethod

      public void setMethod(String method)
      Set the method of the request.
      Parameters:
      method - the method of the request
    • getPath

      public String getPath()
      Returns the path of the request.
      Returns:
      the path of the request
    • setPath

      public void setPath(String path)
      Set the path of the request.
      Parameters:
      path - the path of the request
    • getProtocol

      public String getProtocol()
      Returns the protocol of the request.
      Returns:
      the protocol of the request
    • setProtocol

      public void setProtocol(String protocol)
      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

      public Map<String,String[]> getHeaders()
      Returns the headers of the request.
      Returns:
      the headers of the request
    • setHeaders

      public void setHeaders(Map<String,String[]> headers)
      Set the headers of the request.
      Parameters:
      headers - the headers of the request
    • convertToBase64String

      public String convertToBase64String()
      convert the request array of byte to base64 String.
      Returns:
      the request as base64 String
    • convertBase64StringToByte

      public byte[] convertBase64StringToByte(String requestBase64String)
      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

      public String convertToBase64StringWithID()
      convert the request to base64 String with ID.
      Returns:
      the request as base64 String with ID
    • convertBase64StringToString

      public String convertBase64StringToString(String requestBase64String)
      convert the String from base64 String to request as String.
      Parameters:
      requestBase64String - the request as base64 String
      Returns:
      textString the request as string
    • convertByteArrayToBase64String

      public String convertByteArrayToBase64String(byte[] byteArray)
      convert the array of bytes to Base64 String.
      Parameters:
      byteArray - the request as array of bytes
      Returns:
      byteArrayBase64String the request as base64 String
    • getPathNoParameter

      public String getPathNoParameter()
      get the path without parameters.
      Returns:
      requestString the request as array of bytes