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 TypeMethodDescriptionvoidAdds the object.voidclose()Close.Gets the data host.Gets the data input stream.static InputStreamgetDataInputStream(long ticket) Gets the data input stream.Gets the data output stream.static OutputStreamgetDataOutputStream(long ticket) Gets the data output stream.intGets 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.longGets the ticket.voidopen()Open.voidopen(SocketConfig socketConfig) Open.voidsetMaxBytesPerSec(long maxBytesPerSec) Sets the maximum bytes per seconds.voidsetSocketConfig(SocketConfig socketConfig) Sets the socket config.toString()To string.voidtunnel(SocketConfig socketConfig, String aHost, int aPort) Tunnel.voidTunnel.
-
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:
closein interfaceAutoCloseable- Specified by:
closein 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
-