Class InterruptibleRMIClientSocket
java.lang.Object
java.net.Socket
ecmwf.common.rmi.interruptible.InterruptibleRMIClientSocket
- All Implemented Interfaces:
Closeable, AutoCloseable
The Class InterruptibleRMIClientSocket.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final SocketThe current decoratee.protected static final byteThe Constant SHUTDOWN_SOCKET. -
Constructor Summary
ConstructorsConstructorDescriptionInterruptibleRMIClientSocket(Socket decoratee) Instantiates a new interruptible RMI client socket. -
Method Summary
Modifier and TypeMethodDescriptionvoidbind(SocketAddress bindpoint) Bind.voidclose()Close.voidconnect(SocketAddress endpoint) Connect.voidconnect(SocketAddress endpoint, int timeout) Connect.booleanEquals.This decorator does not implement a decorated SocketChannel.Gets the inet address.Gets the input stream.booleanGets the keep alive.Gets the local address.intGets the local port.Gets the local socket address.booleanGets the OOB inline.Gets the output stream.intgetPort()Gets the port.intGets the receive buffer size.Gets the remote socket address.booleanGets the reuse address.intGets the send buffer size.intGets the so linger.intGets the so timeout.booleanGets the tcp no delay.intGets the traffic class.inthashCode()Hash code.booleanisBound()Checks if is bound.booleanisClosed()Checks if is closed.booleanChecks if is connected.booleanChecks if is input shutdown.booleanChecks if is output shutdown.voidsendUrgentData(int data) Send urgent data.voidsetKeepAlive(boolean on) Sets the keep alive.voidsetOOBInline(boolean on) Sets the OOB inline.voidsetPerformancePreferences(int connectionTime, int latency, int bandwidth) Sets the performance preferences.voidsetReceiveBufferSize(int size) Sets the receive buffer size.voidsetReuseAddress(boolean on) Sets the reuse address.voidsetSendBufferSize(int size) Sets the send buffer size.voidsetSoLinger(boolean on, int linger) Sets the so linger.voidsetSoTimeout(int timeout) Sets the so timeout.voidsetTcpNoDelay(boolean on) Sets the tcp no delay.voidsetTrafficClass(int tc) Sets the traffic class.voidShutdown input.voidShutdown output.toString()To string.Methods inherited from class Socket
getOption, setOption, setSocketImplFactory, supportedOptions
-
Field Details
-
SHUTDOWN_SOCKET
protected static final byte SHUTDOWN_SOCKETThe Constant SHUTDOWN_SOCKET.- See Also:
-
currentDecoratee
The current decoratee.
-
-
Constructor Details
-
InterruptibleRMIClientSocket
Instantiates a new interruptible RMI client socket.- Parameters:
decoratee- the decoratee
-
-
Method Details
-
getInputStream
Gets the input stream.- Overrides:
getInputStreamin classSocket- Returns:
- the input stream
- Throws:
IOException- Signals that an I/O exception has occurred.
-
getOutputStream
Gets the output stream.- Overrides:
getOutputStreamin classSocket- Returns:
- the output stream
- Throws:
IOException- Signals that an I/O exception has occurred.
-
bind
Bind.- Overrides:
bindin classSocket- Parameters:
bindpoint- the bindpoint- Throws:
IOException- Signals that an I/O exception has occurred.
-
close
Close.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classSocket- Throws:
IOException- Signals that an I/O exception has occurred.
-
connect
Connect.- Overrides:
connectin classSocket- Parameters:
endpoint- the endpoint- Throws:
IOException- Signals that an I/O exception has occurred.
-
connect
Connect.- Overrides:
connectin classSocket- Parameters:
endpoint- the endpointtimeout- the timeout- Throws:
IOException- Signals that an I/O exception has occurred.
-
equals
-
getChannel
This decorator does not implement a decorated SocketChannel. This method will always return null.- Overrides:
getChannelin classSocket- Returns:
- the channel
-
getInetAddress
Gets the inet address.- Overrides:
getInetAddressin classSocket- Returns:
- the inet address
-
getKeepAlive
Gets the keep alive.- Overrides:
getKeepAlivein classSocket- Returns:
- the keep alive
- Throws:
SocketException- the socket exception
-
getLocalAddress
Gets the local address.- Overrides:
getLocalAddressin classSocket- Returns:
- the local address
-
getLocalPort
public int getLocalPort()Gets the local port.- Overrides:
getLocalPortin classSocket- Returns:
- the local port
-
getLocalSocketAddress
Gets the local socket address.- Overrides:
getLocalSocketAddressin classSocket- Returns:
- the local socket address
-
getOOBInline
Gets the OOB inline.- Overrides:
getOOBInlinein classSocket- Returns:
- the OOB inline
- Throws:
SocketException- the socket exception
-
getPort
-
getReceiveBufferSize
Gets the receive buffer size.- Overrides:
getReceiveBufferSizein classSocket- Returns:
- the receive buffer size
- Throws:
SocketException- the socket exception
-
getRemoteSocketAddress
Gets the remote socket address.- Overrides:
getRemoteSocketAddressin classSocket- Returns:
- the remote socket address
-
getReuseAddress
Gets the reuse address.- Overrides:
getReuseAddressin classSocket- Returns:
- the reuse address
- Throws:
SocketException- the socket exception
-
getSendBufferSize
Gets the send buffer size.- Overrides:
getSendBufferSizein classSocket- Returns:
- the send buffer size
- Throws:
SocketException- the socket exception
-
getSoLinger
Gets the so linger.- Overrides:
getSoLingerin classSocket- Returns:
- the so linger
- Throws:
SocketException- the socket exception
-
getSoTimeout
Gets the so timeout.- Overrides:
getSoTimeoutin classSocket- Returns:
- the so timeout
- Throws:
SocketException- the socket exception
-
getTcpNoDelay
Gets the tcp no delay.- Overrides:
getTcpNoDelayin classSocket- Returns:
- the tcp no delay
- Throws:
SocketException- the socket exception
-
getTrafficClass
Gets the traffic class.- Overrides:
getTrafficClassin classSocket- Returns:
- the traffic class
- Throws:
SocketException- the socket exception
-
hashCode
-
isBound
-
isClosed
-
isConnected
public boolean isConnected()Checks if is connected.- Overrides:
isConnectedin classSocket- Returns:
- true, if is connected
-
isInputShutdown
public boolean isInputShutdown()Checks if is input shutdown.- Overrides:
isInputShutdownin classSocket- Returns:
- true, if is input shutdown
-
isOutputShutdown
public boolean isOutputShutdown()Checks if is output shutdown.- Overrides:
isOutputShutdownin classSocket- Returns:
- true, if is output shutdown
-
sendUrgentData
Send urgent data.- Overrides:
sendUrgentDatain classSocket- Parameters:
data- the data- Throws:
IOException- Signals that an I/O exception has occurred.
-
setKeepAlive
Sets the keep alive.- Overrides:
setKeepAlivein classSocket- Parameters:
on- the new keep alive- Throws:
SocketException- the socket exception
-
setOOBInline
Sets the OOB inline.- Overrides:
setOOBInlinein classSocket- Parameters:
on- the new OOB inline- Throws:
SocketException- the socket exception
-
setPerformancePreferences
public void setPerformancePreferences(int connectionTime, int latency, int bandwidth) Sets the performance preferences.- Overrides:
setPerformancePreferencesin classSocket- Parameters:
connectionTime- the connection timelatency- the latencybandwidth- the bandwidth
-
setReceiveBufferSize
Sets the receive buffer size.- Overrides:
setReceiveBufferSizein classSocket- Parameters:
size- the new receive buffer size- Throws:
SocketException- the socket exception
-
setReuseAddress
Sets the reuse address.- Overrides:
setReuseAddressin classSocket- Parameters:
on- the new reuse address- Throws:
SocketException- the socket exception
-
setSendBufferSize
Sets the send buffer size.- Overrides:
setSendBufferSizein classSocket- Parameters:
size- the new send buffer size- Throws:
SocketException- the socket exception
-
setSoLinger
Sets the so linger.- Overrides:
setSoLingerin classSocket- Parameters:
on- the onlinger- the linger- Throws:
SocketException- the socket exception
-
setSoTimeout
Sets the so timeout.- Overrides:
setSoTimeoutin classSocket- Parameters:
timeout- the new so timeout- Throws:
SocketException- the socket exception
-
setTcpNoDelay
Sets the tcp no delay.- Overrides:
setTcpNoDelayin classSocket- Parameters:
on- the new tcp no delay- Throws:
SocketException- the socket exception
-
setTrafficClass
Sets the traffic class.- Overrides:
setTrafficClassin classSocket- Parameters:
tc- the new traffic class- Throws:
SocketException- the socket exception
-
shutdownInput
Shutdown input.- Overrides:
shutdownInputin classSocket- Throws:
IOException- Signals that an I/O exception has occurred.
-
shutdownOutput
Shutdown output.- Overrides:
shutdownOutputin classSocket- Throws:
IOException- Signals that an I/O exception has occurred.
-
toString
-