Class ProxySocket
java.lang.Object
ecmwf.common.technical.ProxySocket
-
Constructor Summary
ConstructorsConstructorDescriptionProxySocket
(long ticket, String dataHost, int dataPort, boolean isDirect) Instantiates a new proxy socket.ProxySocket
(SocketConfig socketConfig, String source, String target) Instantiates a new proxy socket.ProxySocket
(String source, long ticket) Instantiates a new proxy socket.ProxySocket
(String source, String target) Instantiates a new proxy socket. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the object.void
close()
Close.Gets the data host.Gets the data input stream.static InputStream
getDataInputStream
(long ticket) Gets the data input stream.Gets the data output stream.static OutputStream
getDataOutputStream
(long ticket) Gets the data output stream.int
Gets the data port.Gets the data socket.getDataSocket
(SocketConfig socketConfig) Gets the data socket.getName()
Gets the name.Gets the object.Gets the socket.Gets the socket config.Gets the source.Gets the target.long
Gets the ticket.void
open()
Open.void
open
(SocketConfig socketConfig) Open.void
setMaxBytesPerSec
(long maxBytesPerSec) Sets the maximum bytes per seconds.void
setSocketConfig
(SocketConfig socketConfig) Sets the socket config.toString()
To string.void
tunnel
(SocketConfig socketConfig, String aHost, int aPort) Tunnel.void
Tunnel.
-
Constructor Details
-
ProxySocket
Instantiates a new proxy socket.- Parameters:
source
- the sourceticket
- the ticket
-
ProxySocket
Instantiates a new proxy socket.- Parameters:
source
- the sourcetarget
- the target- Throws:
IOException
- Signals that an I/O exception has occurred.
-
ProxySocket
Instantiates a new proxy socket.- Parameters:
socketConfig
- the socket configsource
- the sourcetarget
- the target- Throws:
IOException
- Signals that an I/O exception has occurred.
-
ProxySocket
Instantiates a new proxy socket.- Parameters:
ticket
- the ticketdataHost
- the data hostdataPort
- the data portisDirect
- the is direct
-
-
Method Details
-
toString
-
setMaxBytesPerSec
public void setMaxBytesPerSec(long maxBytesPerSec) Sets the maximum bytes per seconds.- Parameters:
maxBytesPerSec
- the new max bytes per sec
-
getSocketConfig
-
setSocketConfig
Sets the socket config.- Parameters:
socketConfig
- the new socket config
-
getDataSocket
Gets the data socket.- Returns:
- the data socket
- Throws:
IOException
- Signals that an I/O exception has occurred.
-
getDataSocket
Gets the data socket.- Parameters:
socketConfig
- the socket config- Returns:
- the data socket
- Throws:
IOException
- Signals that an I/O exception has occurred.
-
close
public void close()Close.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
getDataInputStream
Gets the data input stream.- Parameters:
ticket
- the ticket- Returns:
- the data input stream
- Throws:
IOException
- Signals that an I/O exception has occurred.
-
getDataInputStream
Gets the data input stream.- Returns:
- the data input stream
- Throws:
IOException
- Signals that an I/O exception has occurred.
-
getDataOutputStream
Gets the data output stream.- Parameters:
ticket
- the ticket- Returns:
- the data output stream
- Throws:
IOException
- Signals that an I/O exception has occurred.
-
getDataOutputStream
Gets the data output stream.- Returns:
- the data output stream
- Throws:
IOException
- Signals that an I/O exception has occurred.
-
getName
-
getSocket
Gets the socket.- Returns:
- the socket
- Throws:
IOException
- Signals that an I/O exception has occurred.
-
getSource
-
getTarget
-
getTicket
public long getTicket()Gets the ticket.- Returns:
- the ticket
-
open
Open.- Throws:
IOException
- Signals that an I/O exception has occurred.
-
open
Open.- Parameters:
socketConfig
- the socket config- Throws:
IOException
- Signals that an I/O exception has occurred.
-
tunnel
Tunnel.- Parameters:
aHost
- the a hostaPort
- the a port- Throws:
IOException
- Signals that an I/O exception has occurred.
-
tunnel
Tunnel.- Parameters:
socketConfig
- the socket configaHost
- the a hostaPort
- the a port- Throws:
IOException
- Signals that an I/O exception has occurred.
-
getDataHost
-
getDataPort
public int getDataPort()Gets the data port.- Returns:
- the data port
-
addObject
-
getObject
-