Class Proxy
java.lang.Object
de.iip_ecosphere.platform.deviceMgt.ssh.Proxy
- All Implemented Interfaces:
Runnable
A basic transparent proxy implementation, which should be run in a thread.
Main parts were acquired from https://github.com/oksuz/tcp-proxy (MIT)
- Author:
- oksuz, Github on 29/10/2017.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate InputStreamReturns the input stream.private OutputStreamReturns the output stream.voidrun()This method basically pumps the data fromin.getInputStream()toout.getOutputStream(), which creates a one-directional link between in and out.
-
Field Details
-
LOGGER
private static final de.iip_ecosphere.platform.support.logging.Logger LOGGER -
in
-
out
-
-
Constructor Details
-
Proxy
Creates a one-directional proxy between in and out.- Parameters:
in- Socket to get the data fromout- Socket to pump the data into
-
-
Method Details
-
run
public void run()This method basically pumps the data fromin.getInputStream()toout.getOutputStream(), which creates a one-directional link between in and out. -
getInputStream
Returns the input stream.- Returns:
- the input stream
-
getOutputStream
Returns the output stream.- Returns:
- the output stream
-