Class InterruptibleRMIClientSocket
java.lang.Object
java.net.Socket
ecmwf.common.rmi.interruptible.InterruptibleRMIClientSocket
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final SocketThe current decoratee.protected static final byteThe Constant SHUTDOWN_SOCKET. -
Constructor Summary
ConstructorsConstructorDescriptionInterruptibleRMIClientSocket(Socket decoratee) Create a decorator for the given socket. -
Method Summary
Modifier and TypeMethodDescriptionvoidbind(SocketAddress bindpoint) Bind.voidclose()Close.voidconnect(SocketAddress endpoint) Connect.voidconnect(SocketAddress endpoint, int timeout) Connect.booleanReturn 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.InterruptibleRMISocketInputStreamthat decorates the InputStream returned by decoratee#getInputStream.booleanGets the keep alive.Gets the local address.intGets the local port.Gets the local socket address.booleanGets the OOB inline.Return an instance ofInterruptibleRMISocket.InterruptibleRMISocketOutputStreamthat decorates the OutputStream returned by decoratee#getOutputStream.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()Return decoratee#hashCode().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()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:
bindin classSocket- Throws:
IOException- See Also:
-
close
Close.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classSocket- Throws:
IOException- See Also:
-
connect
Connect.- Overrides:
connectin classSocket- Throws:
IOException- See Also:
-
connect
Connect.- Overrides:
connectin classSocket- Throws:
IOException- See Also:
-
equals
-
getChannel
This decorator does not implement a decorated SocketChannel. This method will always return null.- Overrides:
getChannelin classSocket
-
getInetAddress
Gets the inet address.- Overrides:
getInetAddressin classSocket- See Also:
-
getInputStream
Return an instance ofInterruptibleRMISocket.InterruptibleRMISocketInputStreamthat decorates the InputStream returned by decoratee#getInputStream.- Overrides:
getInputStreamin classSocket- Throws:
IOException- See Also:
-
getKeepAlive
Gets the keep alive.- Overrides:
getKeepAlivein classSocket- Throws:
SocketException- See Also:
-
getLocalAddress
Gets the local address.- Overrides:
getLocalAddressin classSocket- See Also:
-
getLocalPort
-
getLocalSocketAddress
Gets the local socket address.- Overrides:
getLocalSocketAddressin classSocket- See Also:
-
getOOBInline
Gets the OOB inline.- Overrides:
getOOBInlinein classSocket- Throws:
SocketException- See Also:
-
getOutputStream
Return an instance ofInterruptibleRMISocket.InterruptibleRMISocketOutputStreamthat decorates the OutputStream returned by decoratee#getOutputStream.- Overrides:
getOutputStreamin classSocket- Throws:
IOException- See Also:
-
getPort
-
getReceiveBufferSize
Gets the receive buffer size.- Overrides:
getReceiveBufferSizein classSocket- Throws:
SocketException- See Also:
-
getRemoteSocketAddress
Gets the remote socket address.- Overrides:
getRemoteSocketAddressin classSocket- See Also:
-
getReuseAddress
Gets the reuse address.- Overrides:
getReuseAddressin classSocket- Throws:
SocketException- See Also:
-
getSendBufferSize
Gets the send buffer size.- Overrides:
getSendBufferSizein classSocket- Throws:
SocketException- See Also:
-
getSoLinger
Gets the so linger.- Overrides:
getSoLingerin classSocket- Throws:
SocketException- See Also:
-
getSoTimeout
Gets the so timeout.- Overrides:
getSoTimeoutin classSocket- Throws:
SocketException- See Also:
-
getTcpNoDelay
Gets the tcp no delay.- Overrides:
getTcpNoDelayin classSocket- Throws:
SocketException- See Also:
-
getTrafficClass
Gets the traffic class.- Overrides:
getTrafficClassin classSocket- Throws:
SocketException- See Also:
-
hashCode
-
isBound
-
isClosed
-
isConnected
public boolean isConnected()Checks if is connected.- Overrides:
isConnectedin classSocket- See Also:
-
isInputShutdown
public boolean isInputShutdown()Checks if is input shutdown.- Overrides:
isInputShutdownin classSocket- See Also:
-
isOutputShutdown
public boolean isOutputShutdown()Checks if is output shutdown.- Overrides:
isOutputShutdownin classSocket- See Also:
-
sendUrgentData
Send urgent data.- Overrides:
sendUrgentDatain classSocket- Throws:
IOException- See Also:
-
setKeepAlive
Sets the keep alive.- Overrides:
setKeepAlivein classSocket- Throws:
SocketException- See Also:
-
setOOBInline
Sets the OOB inline.- Overrides:
setOOBInlinein classSocket- Throws:
SocketException- See Also:
-
setPerformancePreferences
public void setPerformancePreferences(int connectionTime, int latency, int bandwidth) Sets the performance preferences.- Overrides:
setPerformancePreferencesin classSocket- See Also:
-
setReceiveBufferSize
Sets the receive buffer size.- Overrides:
setReceiveBufferSizein classSocket- Throws:
SocketException- See Also:
-
setReuseAddress
Sets the reuse address.- Overrides:
setReuseAddressin classSocket- Throws:
SocketException- See Also:
-
setSendBufferSize
Sets the send buffer size.- Overrides:
setSendBufferSizein classSocket- Throws:
SocketException- See Also:
-
setSoLinger
Sets the so linger.- Overrides:
setSoLingerin classSocket- Throws:
SocketException- See Also:
-
setSoTimeout
Sets the so timeout.- Overrides:
setSoTimeoutin classSocket- Throws:
SocketException- See Also:
-
setTcpNoDelay
Sets the tcp no delay.- Overrides:
setTcpNoDelayin classSocket- Throws:
SocketException- See Also:
-
setTrafficClass
Sets the traffic class.- Overrides:
setTrafficClassin classSocket- Throws:
SocketException- See Also:
-
shutdownInput
Shutdown input.- Overrides:
shutdownInputin classSocket- Throws:
IOException- See Also:
-
shutdownOutput
Shutdown output.- Overrides:
shutdownOutputin classSocket- Throws:
IOException- See Also:
-
toString
-