Class ServerHttpJavaK8SProxy
java.lang.Object
test.de.iip_ecosphere.platform.ecsRuntime.kubernetes.ServerHttpJavaK8SProxy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static intprivate static Stringprivate static Stringprivate static ArrayList<ServerSocket> private static boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intReturns the port on localhost to receive new requests.static StringReturns the IP Address of the server (either the MasterProxy or K8S apiserver).static StringReturns the port of the server (either the MasterProxy or K8S apiserver).static voidThe main method to run the server proxy.static voidsetLocalPort(int localPort) Set the port on localhost to receive new requests.static voidsetServerIP(String serverIP) Set the IP Address of the server (either the MasterProxy or K8S apiserver).static voidsetServerPort(String serverPort) Set the port of the server (either the MasterProxy or K8S apiserver).static voidstartMultiThreaded(de.iip_ecosphere.platform.ecsRuntime.kubernetes.proxy.K8SJavaProxy httpJavaK8SProxy, int localPort) Start multi-threads method to receive and process requests.
-
Field Details
-
localPort
private static int localPort -
serverIP
-
serverPort
-
tlsCheck
private static boolean tlsCheck -
serverSocketList
-
-
Constructor Details
-
ServerHttpJavaK8SProxy
public ServerHttpJavaK8SProxy()
-
-
Method Details
-
getLocalPort
public static int getLocalPort()Returns the port on localhost to receive new requests.- Returns:
- the port on localhost to receive new requests
-
setLocalPort
public static void setLocalPort(int localPort) Set the port on localhost to receive new requests.- Parameters:
localPort- the port on localhost to receive new requests
-
getServerIP
Returns the IP Address of the server (either the MasterProxy or K8S apiserver).- Returns:
- the IP Address of the server (either the MasterProxy or K8S apiserver)
-
setServerIP
Set the IP Address of the server (either the MasterProxy or K8S apiserver).- Parameters:
serverIP- the IP Address of the server (either the MasterProxy or K8S apiserver)
-
getServerPort
Returns the port of the server (either the MasterProxy or K8S apiserver).- Returns:
- the port of the server (either the MasterProxy or K8S apiserver)
-
setServerPort
Set the port of the server (either the MasterProxy or K8S apiserver).- Parameters:
serverPort- the port of the server (either the MasterProxy or K8S apiserver).
-
main
The main method to run the server proxy.- Parameters:
args- the main method arguments
-
startMultiThreaded
public static void startMultiThreaded(de.iip_ecosphere.platform.ecsRuntime.kubernetes.proxy.K8SJavaProxy httpJavaK8SProxy, int localPort) throws UnrecoverableKeyException, KeyManagementException, NoSuchAlgorithmException, KeyStoreException, CertificateException, InvalidKeySpecException, IOException Start multi-threads method to receive and process requests.- Parameters:
httpJavaK8SProxy- the proxy used to receive the new requestslocalPort- is the port on the localhost to receive the new requests- Throws:
IOExceptionInvalidKeySpecExceptionCertificateExceptionKeyStoreExceptionNoSuchAlgorithmExceptionKeyManagementExceptionUnrecoverableKeyException
-