Class WorkerMqttJavaK8SProxy
java.lang.Object
test.de.iip_ecosphere.platform.ecsRuntime.kubernetes.WorkerMqttJavaK8SProxy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static ArrayList<TransportK8SJavaProxy> private static intprivate 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.intReturns the mqtt port.static StringReturns the IP Address of the server.static StringReturns the port of the server (either the Aas port or K8S apiserver port).static voidThe main method to run the server proxy.voidmainTest()The main method to run the test server proxy.static voidsetLocalPort(int localPort) Set the port on localhost to receive new requests.voidsetMqttPort(int mqttPort) Set the mqtt port.static voidsetServerIP(String serverIP) Set the IP Address of the server.static voidsetServerPort(String serverPort) Set the port of the server (either the Aas port or K8S apiserver port).static voidstartMultiThreaded(de.iip_ecosphere.platform.ecsRuntime.kubernetes.proxy.K8SJavaProxy mqttK8SJavaProxy, int localPort) Start multi-threads method to receive and process requests.
-
Field Details
-
localPort
private static int localPort -
mqttPort
private static int mqttPort -
serverIP
-
serverPort
-
tlsCheck
private static boolean tlsCheck -
serverSocketList
-
k8SJavaProxyList
-
-
Constructor Details
-
WorkerMqttJavaK8SProxy
public WorkerMqttJavaK8SProxy()
-
-
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.- Returns:
- the IP Address of the server
-
setServerIP
Set the IP Address of the server.- Parameters:
serverIP- the IP Address of the server
-
getServerPort
Returns the port of the server (either the Aas port or K8S apiserver port).- Returns:
- the port of the server (either the Aas port or K8S apiserver port)
-
setServerPort
Set the port of the server (either the Aas port or K8S apiserver port).- Parameters:
serverPort- the port of the server (either the Aas port or K8S apiserver port).
-
getMqttPort
public int getMqttPort()Returns the mqtt port.- Returns:
- the mqtt port
-
setMqttPort
public void setMqttPort(int mqttPort) Set the mqtt port.- Parameters:
mqttPort- the mqtt port
-
main
The main method to run the server proxy.- Parameters:
args- the main method arguments
-
mainTest
public void mainTest()The main method to run the test server proxy. -
startMultiThreaded
public static void startMultiThreaded(de.iip_ecosphere.platform.ecsRuntime.kubernetes.proxy.K8SJavaProxy mqttK8SJavaProxy, int localPort) throws UnrecoverableKeyException, KeyManagementException, NoSuchAlgorithmException, KeyStoreException, CertificateException, InvalidKeySpecException, IOException Start multi-threads method to receive and process requests.- Parameters:
mqttK8SJavaProxy- the proxy used to receive the new requestslocalPort- is the port on the localhost to receive the new requests- Throws:
IOExceptionInvalidKeySpecExceptionCertificateExceptionKeyStoreExceptionNoSuchAlgorithmExceptionKeyManagementExceptionUnrecoverableKeyException
-