Class TransportK8SJavaProxy

java.lang.Object
de.iip_ecosphere.platform.ecsRuntime.kubernetes.proxy.AbstractK8SJavaProxy
test.de.iip_ecosphere.platform.ecsRuntime.kubernetes.TransportK8SJavaProxy
All Implemented Interfaces:
de.iip_ecosphere.platform.ecsRuntime.kubernetes.proxy.K8SJavaProxy

public class TransportK8SJavaProxy extends de.iip_ecosphere.platform.ecsRuntime.kubernetes.proxy.AbstractK8SJavaProxy
The Implementation of transport for the Abstract class AbstractK8SJavaProxy. K8S (Kubernetes)
Author:
Ahmad Alamoush, SSE
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private de.iip_ecosphere.platform.transport.connectors.TransportConnector
     
    private de.iip_ecosphere.platform.transport.connectors.TransportParameter
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    TransportK8SJavaProxy(de.iip_ecosphere.platform.ecsRuntime.kubernetes.proxy.ProxyType proxyType, String serverIP, String serverPort, boolean tlsCheck)
    Creates a K8S java proxy instance, it will be either MasterProxy or WorkerProxy.
    TransportK8SJavaProxy(de.iip_ecosphere.platform.ecsRuntime.kubernetes.proxy.ProxyType proxyType, String serverIP, String serverPort, TransportK8STLS transportK8STLS)
    Creates a K8S java proxy instance, it will be either MasterProxy or WorkerProxy.
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    executeK8SDelete(de.iip_ecosphere.platform.ecsRuntime.kubernetes.proxy.K8SRequest request)
    Execute DELETE request and send it to the MasterProxy.
    byte[]
    executeK8SGet(BufferedOutputStream writer, de.iip_ecosphere.platform.ecsRuntime.kubernetes.proxy.K8SRequest request)
    Execute GET request and send it to the MasterProxy.
    byte[]
    executeK8SPatch(de.iip_ecosphere.platform.ecsRuntime.kubernetes.proxy.K8SRequest request)
    Execute PATCH request and send it to the MasterProxy.
    byte[]
    executeK8SPost(de.iip_ecosphere.platform.ecsRuntime.kubernetes.proxy.K8SRequest request)
    Execute POST request and send it to the MasterProxy.
    byte[]
    executeK8SPut(de.iip_ecosphere.platform.ecsRuntime.kubernetes.proxy.K8SRequest request)
    Execute PUT request and send it to the MasterProxy.
    de.iip_ecosphere.platform.transport.connectors.TransportConnector
    Returns the transport connector.
    byte[]
    sendK8SRequest(BufferedOutputStream writer, de.iip_ecosphere.platform.ecsRuntime.kubernetes.proxy.K8SRequest request)
     
    void
    setNormalcl1(de.iip_ecosphere.platform.transport.connectors.TransportConnector normalcl1)
    Set the transport connector.

    Methods inherited from class de.iip_ecosphere.platform.ecsRuntime.kubernetes.proxy.AbstractK8SJavaProxy

    createK8SRequest, executeK8SJavaClientRequest, executeWatchK8SJavaClientRequest, extractK8SRequestByte, formatK8SResponse, formatK8SResponse, formatWatchK8SResponse, formatWatchK8SResponse, getProxyType, getServerAddress, getServerAddress, getServerSocket, setProxyType, setServerAddress

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • normalcl1

      private de.iip_ecosphere.platform.transport.connectors.TransportConnector normalcl1
    • param1

      private de.iip_ecosphere.platform.transport.connectors.TransportParameter param1
  • Constructor Details

    • TransportK8SJavaProxy

      public TransportK8SJavaProxy(de.iip_ecosphere.platform.ecsRuntime.kubernetes.proxy.ProxyType proxyType, String serverIP, String serverPort, boolean tlsCheck)
      Creates a K8S java proxy instance, it will be either MasterProxy or WorkerProxy. If it is MasterProxy then IP address and port will be to the K8S apiserver address and port If it is WorkerProxy then IP address and port will be to the MasterProxy address and port
      Parameters:
      proxyType - the type of the proxy (MasterProxy or WorkerProxy)
      serverIP - the IP Address of the server
      serverPort - the port of the server (either the Aas port or K8S apiserver port)
      tlsCheck - check to use tls security
    • TransportK8SJavaProxy

      public TransportK8SJavaProxy(de.iip_ecosphere.platform.ecsRuntime.kubernetes.proxy.ProxyType proxyType, String serverIP, String serverPort, TransportK8STLS transportK8STLS) throws IOException
      Creates a K8S java proxy instance, it will be either MasterProxy or WorkerProxy. If it is MasterProxy then IP address and port will be to the K8S apiserver address and port If it is WorkerProxy then IP address and port will be to the MasterProxy address and port
      Parameters:
      proxyType - the type of the proxy (MasterProxy or WorkerProxy)
      serverIP - the IP Address of the server
      serverPort - the port of the server (either the Aas port or K8S apiserver port)
      transportK8STLS - the tls security information
      Throws:
      IOException
  • Method Details

    • getNormalcl1

      public de.iip_ecosphere.platform.transport.connectors.TransportConnector getNormalcl1()
      Returns the transport connector.
      Returns:
      the transport connector
    • setNormalcl1

      public void setNormalcl1(de.iip_ecosphere.platform.transport.connectors.TransportConnector normalcl1)
      Set the transport connector.
      Parameters:
      normalcl1 - the transport connector
    • sendK8SRequest

      public byte[] sendK8SRequest(BufferedOutputStream writer, de.iip_ecosphere.platform.ecsRuntime.kubernetes.proxy.K8SRequest request) throws IOException
      Specified by:
      sendK8SRequest in interface de.iip_ecosphere.platform.ecsRuntime.kubernetes.proxy.K8SJavaProxy
      Overrides:
      sendK8SRequest in class de.iip_ecosphere.platform.ecsRuntime.kubernetes.proxy.AbstractK8SJavaProxy
      Throws:
      IOException
    • executeK8SGet

      public byte[] executeK8SGet(BufferedOutputStream writer, de.iip_ecosphere.platform.ecsRuntime.kubernetes.proxy.K8SRequest request) throws org.apache.http.client.ClientProtocolException, IOException
      Execute GET request and send it to the MasterProxy.
      Parameters:
      writer - is the output buffer to send watch request stream
      request - the K8S request object (K8SRequest)
      Returns:
      the response from the MasterProxy for sent GET request
      Throws:
      IOException
      org.apache.http.client.ClientProtocolException
    • executeK8SPost

      public byte[] executeK8SPost(de.iip_ecosphere.platform.ecsRuntime.kubernetes.proxy.K8SRequest request) throws org.apache.http.client.ClientProtocolException, IOException
      Execute POST request and send it to the MasterProxy.
      Parameters:
      request - the K8S request object (K8SRequest)
      Returns:
      the response from the MasterProxy for sent POST request
      Throws:
      IOException
      org.apache.http.client.ClientProtocolException
    • executeK8SPut

      public byte[] executeK8SPut(de.iip_ecosphere.platform.ecsRuntime.kubernetes.proxy.K8SRequest request) throws org.apache.http.client.ClientProtocolException, IOException
      Execute PUT request and send it to the MasterProxy.
      Parameters:
      request - the K8S request object (K8SRequest)
      Returns:
      the response from the MasterProxy for sent PUT request
      Throws:
      IOException
      org.apache.http.client.ClientProtocolException
    • executeK8SPatch

      public byte[] executeK8SPatch(de.iip_ecosphere.platform.ecsRuntime.kubernetes.proxy.K8SRequest request) throws org.apache.http.client.ClientProtocolException, IOException
      Execute PATCH request and send it to the MasterProxy.
      Parameters:
      request - the K8S request object (K8SRequest)
      Returns:
      the response from the MasterProxy for sent PATCH request
      Throws:
      IOException
      org.apache.http.client.ClientProtocolException
    • executeK8SDelete

      public byte[] executeK8SDelete(de.iip_ecosphere.platform.ecsRuntime.kubernetes.proxy.K8SRequest request) throws org.apache.http.client.ClientProtocolException, IOException
      Execute DELETE request and send it to the MasterProxy.
      Parameters:
      request - the K8S request object (K8SRequest)
      Returns:
      the response from the MasterProxy for sent DELETE request
      Throws:
      IOException
      org.apache.http.client.ClientProtocolException