Class InterruptibleRMIServerSocket
java.lang.Object
java.net.ServerSocket
ecmwf.common.rmi.interruptible.InterruptibleRMIServerSocket
-
Constructor Summary
ConstructorsConstructorDescriptionInterruptibleRMIServerSocket(ServerSocket serverSocket) Create decorator for given socket. -
Method Summary
Modifier and TypeMethodDescriptionaccept()Accept.voidbind(SocketAddress endpoint) Bind.voidbind(SocketAddress endpoint, int backlog) Bind.voidclose()Close.booleanReturns true if the decoratee's equals method returns true.Not implemented - always returns null.static SocketReturn the socket associated with the RMI server thread (the current thread).Gets the inet address.intGets the local port.Gets the local socket address.intGets the receive buffer size.booleanGets the reuse address.intGets the so timeout.inthashCode()Return the hashcode of the decorated socket.booleanisBound()Checks if is bound.booleanisClosed()Checks if is closed.static booleanReturn true if the socket associated with the RMI server thread (the current thread) has not been closed or marked for shutdown by the client of the RMI thread.static booleanReturn true if the socket provided has not been closed or marked for shutdown by the client of the RMI thread.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.voidsetSoTimeout(int timeout) Sets the so timeout.toString()To string.Methods inherited from class java.net.ServerSocket
getOption, implAccept, setOption, setSocketFactory, supportedOptions
-
Constructor Details
-
InterruptibleRMIServerSocket
Create decorator for given socket.- Parameters:
serverSocket- the server socket- Throws:
IOException- Signals that an I/O exception has occurred.
-
-
Method Details
-
getCurrentRMIServerThreadSocket
Return the socket associated with the RMI server thread (the current thread).- Returns:
- socket
-
isCurrentRMIServerThreadSocketAlive
public static boolean isCurrentRMIServerThreadSocketAlive()Return true if the socket associated with the RMI server thread (the current thread) has not been closed or marked for shutdown by the client of the RMI thread.- Returns:
- true, if is current RMI server thread socket alive
-
isCurrentRMIServerThreadSocketAlive
Return true if the socket provided has not been closed or marked for shutdown by the client of the RMI thread. The socket is provided beforehand by a call to the getCurrentRMIServerThreadSocket method.- Parameters:
socket- the socket- Returns:
- true, if is current RMI server thread socket alive
-
accept
Accept.- Overrides:
acceptin classServerSocket- Throws:
IOException- See Also:
-
bind
Bind.- Overrides:
bindin classServerSocket- Throws:
IOException- See Also:
-
bind
Bind.- Overrides:
bindin classServerSocket- Throws:
IOException- See Also:
-
close
Close.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classServerSocket- Throws:
IOException- See Also:
-
equals
-
getChannel
Not implemented - always returns null.- Overrides:
getChannelin classServerSocket- See Also:
-
getInetAddress
Gets the inet address.- Overrides:
getInetAddressin classServerSocket- See Also:
-
getLocalPort
public int getLocalPort()Gets the local port.- Overrides:
getLocalPortin classServerSocket- See Also:
-
getLocalSocketAddress
Gets the local socket address.- Overrides:
getLocalSocketAddressin classServerSocket- See Also:
-
getReceiveBufferSize
Gets the receive buffer size.- Overrides:
getReceiveBufferSizein classServerSocket- Throws:
SocketException- See Also:
-
getReuseAddress
Gets the reuse address.- Overrides:
getReuseAddressin classServerSocket- Throws:
SocketException- See Also:
-
getSoTimeout
Gets the so timeout.- Overrides:
getSoTimeoutin classServerSocket- Throws:
IOException- See Also:
-
hashCode
-
isBound
-
isClosed
-
setPerformancePreferences
public void setPerformancePreferences(int connectionTime, int latency, int bandwidth) Sets the performance preferences.- Overrides:
setPerformancePreferencesin classServerSocket- See Also:
-
setReceiveBufferSize
Sets the receive buffer size.- Overrides:
setReceiveBufferSizein classServerSocket- Throws:
SocketException- See Also:
-
setReuseAddress
Sets the reuse address.- Overrides:
setReuseAddressin classServerSocket- Throws:
SocketException- See Also:
-
setSoTimeout
Sets the so timeout.- Overrides:
setSoTimeoutin classServerSocket- Throws:
SocketException- See Also:
-
toString
-