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 -
Constructor Summary
ConstructorsConstructorDescriptionTransportK8SJavaProxy(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 TypeMethodDescriptionbyte[]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.TransportConnectorReturns the transport connector.byte[]sendK8SRequest(BufferedOutputStream writer, de.iip_ecosphere.platform.ecsRuntime.kubernetes.proxy.K8SRequest request) voidsetNormalcl1(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
-
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 serverserverPort- 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 serverserverPort- 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:
sendK8SRequestin interfacede.iip_ecosphere.platform.ecsRuntime.kubernetes.proxy.K8SJavaProxy- Overrides:
sendK8SRequestin classde.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 streamrequest- the K8S request object (K8SRequest)- Returns:
- the response from the MasterProxy for sent GET request
- Throws:
IOExceptionorg.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:
IOExceptionorg.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:
IOExceptionorg.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:
IOExceptionorg.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:
IOExceptionorg.apache.http.client.ClientProtocolException
-