Class InterruptibleRMIClientSocket
java.lang.Object
java.net.Socket
ecmwf.common.rmi.interruptible.InterruptibleRMIClientSocket
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Socket
The current decoratee.protected static final byte
The Constant SHUTDOWN_SOCKET. -
Constructor Summary
ConstructorsConstructorDescriptionInterruptibleRMIClientSocket
(Socket decoratee) Create a decorator for the given socket. -
Method Summary
Modifier and TypeMethodDescriptionvoid
bind
(SocketAddress bindpoint) Bind.void
close()
Close.void
connect
(SocketAddress endpoint) Connect.void
connect
(SocketAddress endpoint, int timeout) Connect.boolean
Return true if the object is an instance of InterruptibleRMIClientSocket and decoratee.equals(object) returns true.This decorator does not implement a decorated SocketChannel.Gets the inet address.Return an instance ofInterruptibleRMISocket.InterruptibleRMISocketInputStream
that decorates the InputStream returned by decoratee#getInputStream.boolean
Gets the keep alive.Gets the local address.int
Gets the local port.Gets the local socket address.boolean
Gets the OOB inline.Return an instance ofInterruptibleRMISocket.InterruptibleRMISocketOutputStream
that decorates the OutputStream returned by decoratee#getOutputStream.int
getPort()
Gets the port.int
Gets the receive buffer size.Gets the remote socket address.boolean
Gets the reuse address.int
Gets the send buffer size.int
Gets the so linger.int
Gets the so timeout.boolean
Gets the tcp no delay.int
Gets the traffic class.int
hashCode()
Return decoratee#hashCode().boolean
isBound()
Checks if is bound.boolean
isClosed()
Checks if is closed.boolean
Checks if is connected.boolean
Checks if is input shutdown.boolean
Checks if is output shutdown.void
sendUrgentData
(int data) Send urgent data.void
setKeepAlive
(boolean on) Sets the keep alive.void
setOOBInline
(boolean on) Sets the OOB inline.void
setPerformancePreferences
(int connectionTime, int latency, int bandwidth) Sets the performance preferences.void
setReceiveBufferSize
(int size) Sets the receive buffer size.void
setReuseAddress
(boolean on) Sets the reuse address.void
setSendBufferSize
(int size) Sets the send buffer size.void
setSoLinger
(boolean on, int linger) Sets the so linger.void
setSoTimeout
(int timeout) Sets the so timeout.void
setTcpNoDelay
(boolean on) Sets the tcp no delay.void
setTrafficClass
(int tc) Sets the traffic class.void
Shutdown input.void
Shutdown output.toString()
Return decoratee#toString().Methods inherited from class java.net.Socket
getOption, setOption, setSocketImplFactory, supportedOptions
-
Field Details
-
SHUTDOWN_SOCKET
protected static final byte SHUTDOWN_SOCKETThe Constant SHUTDOWN_SOCKET. Special value to indicate that the server side socket should shutdown.- See Also:
-
currentDecoratee
The current decoratee.
-
-
Constructor Details
-
InterruptibleRMIClientSocket
Create a decorator for the given socket.- Parameters:
decoratee
- the decoratee
-
-
Method Details
-
bind
Bind.- Overrides:
bind
in classSocket
- Throws:
IOException
- See Also:
-
close
Close.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classSocket
- Throws:
IOException
- See Also:
-
connect
Connect.- Overrides:
connect
in classSocket
- Throws:
IOException
- See Also:
-
connect
Connect.- Overrides:
connect
in classSocket
- Throws:
IOException
- See Also:
-
equals
-
getChannel
This decorator does not implement a decorated SocketChannel. This method will always return null.- Overrides:
getChannel
in classSocket
-
getInetAddress
Gets the inet address.- Overrides:
getInetAddress
in classSocket
- See Also:
-
getInputStream
Return an instance ofInterruptibleRMISocket.InterruptibleRMISocketInputStream
that decorates the InputStream returned by decoratee#getInputStream.- Overrides:
getInputStream
in classSocket
- Throws:
IOException
- See Also:
-
getKeepAlive
Gets the keep alive.- Overrides:
getKeepAlive
in classSocket
- Throws:
SocketException
- See Also:
-
getLocalAddress
Gets the local address.- Overrides:
getLocalAddress
in classSocket
- See Also:
-
getLocalPort
-
getLocalSocketAddress
Gets the local socket address.- Overrides:
getLocalSocketAddress
in classSocket
- See Also:
-
getOOBInline
Gets the OOB inline.- Overrides:
getOOBInline
in classSocket
- Throws:
SocketException
- See Also:
-
getOutputStream
Return an instance ofInterruptibleRMISocket.InterruptibleRMISocketOutputStream
that decorates the OutputStream returned by decoratee#getOutputStream.- Overrides:
getOutputStream
in classSocket
- Throws:
IOException
- See Also:
-
getPort
-
getReceiveBufferSize
Gets the receive buffer size.- Overrides:
getReceiveBufferSize
in classSocket
- Throws:
SocketException
- See Also:
-
getRemoteSocketAddress
Gets the remote socket address.- Overrides:
getRemoteSocketAddress
in classSocket
- See Also:
-
getReuseAddress
Gets the reuse address.- Overrides:
getReuseAddress
in classSocket
- Throws:
SocketException
- See Also:
-
getSendBufferSize
Gets the send buffer size.- Overrides:
getSendBufferSize
in classSocket
- Throws:
SocketException
- See Also:
-
getSoLinger
Gets the so linger.- Overrides:
getSoLinger
in classSocket
- Throws:
SocketException
- See Also:
-
getSoTimeout
Gets the so timeout.- Overrides:
getSoTimeout
in classSocket
- Throws:
SocketException
- See Also:
-
getTcpNoDelay
Gets the tcp no delay.- Overrides:
getTcpNoDelay
in classSocket
- Throws:
SocketException
- See Also:
-
getTrafficClass
Gets the traffic class.- Overrides:
getTrafficClass
in classSocket
- Throws:
SocketException
- See Also:
-
hashCode
-
isBound
-
isClosed
-
isConnected
public boolean isConnected()Checks if is connected.- Overrides:
isConnected
in classSocket
- See Also:
-
isInputShutdown
public boolean isInputShutdown()Checks if is input shutdown.- Overrides:
isInputShutdown
in classSocket
- See Also:
-
isOutputShutdown
public boolean isOutputShutdown()Checks if is output shutdown.- Overrides:
isOutputShutdown
in classSocket
- See Also:
-
sendUrgentData
Send urgent data.- Overrides:
sendUrgentData
in classSocket
- Throws:
IOException
- See Also:
-
setKeepAlive
Sets the keep alive.- Overrides:
setKeepAlive
in classSocket
- Throws:
SocketException
- See Also:
-
setOOBInline
Sets the OOB inline.- Overrides:
setOOBInline
in classSocket
- Throws:
SocketException
- See Also:
-
setPerformancePreferences
public void setPerformancePreferences(int connectionTime, int latency, int bandwidth) Sets the performance preferences.- Overrides:
setPerformancePreferences
in classSocket
- See Also:
-
setReceiveBufferSize
Sets the receive buffer size.- Overrides:
setReceiveBufferSize
in classSocket
- Throws:
SocketException
- See Also:
-
setReuseAddress
Sets the reuse address.- Overrides:
setReuseAddress
in classSocket
- Throws:
SocketException
- See Also:
-
setSendBufferSize
Sets the send buffer size.- Overrides:
setSendBufferSize
in classSocket
- Throws:
SocketException
- See Also:
-
setSoLinger
Sets the so linger.- Overrides:
setSoLinger
in classSocket
- Throws:
SocketException
- See Also:
-
setSoTimeout
Sets the so timeout.- Overrides:
setSoTimeout
in classSocket
- Throws:
SocketException
- See Also:
-
setTcpNoDelay
Sets the tcp no delay.- Overrides:
setTcpNoDelay
in classSocket
- Throws:
SocketException
- See Also:
-
setTrafficClass
Sets the traffic class.- Overrides:
setTrafficClass
in classSocket
- Throws:
SocketException
- See Also:
-
shutdownInput
Shutdown input.- Overrides:
shutdownInput
in classSocket
- Throws:
IOException
- See Also:
-
shutdownOutput
Shutdown output.- Overrides:
shutdownOutput
in classSocket
- Throws:
IOException
- See Also:
-
toString
-