Class AasK8SJavaProxy
java.lang.Object
de.iip_ecosphere.platform.ecsRuntime.kubernetes.proxy.AbstractK8SJavaProxy
de.iip_ecosphere.platform.ecsRuntime.kubernetes.proxy.AasK8SJavaProxy
- All Implemented Interfaces:
K8SJavaProxy
The Implementation of AAS for the Abstract class AbstractK8SJavaProxy.
K8S (Kubernetes)
- Author:
- Ahmad Alamoush, SSE
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate de.iip_ecosphere.platform.support.aas.Aasprivate de.iip_ecosphere.platform.support.aas.Submodelprivate de.iip_ecosphere.platform.support.aas.Aasprivate de.iip_ecosphere.platform.support.aas.Submodel -
Constructor Summary
ConstructorsConstructorDescriptionAasK8SJavaProxy(ProxyType proxyType, int aasPort, String serverIP, String serverPort, boolean tlsCheck) Creates a K8S java proxy instance, it will be either MasterProxy or WorkerProxy. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]executeK8SDelete(K8SRequest request) Execute DELETE request and send it to the MasterProxy.byte[]executeK8SGet(BufferedOutputStream writer, K8SRequest request) Execute GET request and send it to the MasterProxy.byte[]executeK8SPatch(K8SRequest request) Execute PATCH request and send it to the MasterProxy.byte[]executeK8SPost(K8SRequest request) Execute POST request and send it to the MasterProxy.byte[]executeK8SPut(K8SRequest request) Execute PUT request and send it to the MasterProxy.formatWatchK8SResponse(BufferedWriter writer, K8SRequest request, okhttp3.Response response) Format the response from K8S apiserver.byte[]sendK8SRequest(BufferedOutputStream writer, K8SRequest request) Send the K8S request object to the MasterProxy or K8S apiserver.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
-
submodel
private de.iip_ecosphere.platform.support.aas.Submodel submodel -
aas
private de.iip_ecosphere.platform.support.aas.Aas aas -
watchSubmodel
private de.iip_ecosphere.platform.support.aas.Submodel watchSubmodel -
watchAas
private de.iip_ecosphere.platform.support.aas.Aas watchAas
-
-
Constructor Details
-
AasK8SJavaProxy
public AasK8SJavaProxy(ProxyType proxyType, int aasPort, 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)aasPort- the aas portserverIP- 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
-
-
Method Details
-
sendK8SRequest
Description copied from class:AbstractK8SJavaProxySend the K8S request object to the MasterProxy or K8S apiserver.- Specified by:
sendK8SRequestin interfaceK8SJavaProxy- Overrides:
sendK8SRequestin classAbstractK8SJavaProxy- Parameters:
writer- is the output buffer to send watch request streamrequest- the K8S request object (K8SRequest)- Returns:
- the response from the MasterProxy or K8S apiserver for sent request
- Throws:
IOException
-
executeK8SGet
public byte[] executeK8SGet(BufferedOutputStream writer, 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(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(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(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(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
-
formatWatchK8SResponse
public String formatWatchK8SResponse(BufferedWriter writer, K8SRequest request, okhttp3.Response response) throws IOException Format the response from K8S apiserver.- Parameters:
writer-request- the K8S request object (K8SRequest)response- the response from the K8S apiserver- Returns:
- the formated response
- Throws:
IOException
-