Package org.globus.net
Class WrappedSocket
- java.lang.Object
-
- java.net.Socket
-
- org.globus.net.WrappedSocket
-
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
GssSocket
public class WrappedSocket extends Socket
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedWrappedSocket()WrappedSocket(Socket socket)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()InetAddressgetInetAddress()InputStreamgetInputStream()booleangetKeepAlive()InetAddressgetLocalAddress()intgetLocalPort()OutputStreamgetOutputStream()intgetPort()intgetReceiveBufferSize()intgetSendBufferSize()intgetSoLinger()intgetSoTimeout()booleangetTcpNoDelay()SocketgetWrappedSocket()voidsetKeepAlive(boolean on)voidsetReceiveBufferSize(int size)voidsetSendBufferSize(int size)voidsetSoLinger(boolean on, int linger)voidsetSoTimeout(int timeout)voidsetTcpNoDelay(boolean on)voidshutdownInput()voidshutdownOutput()StringtoString()-
Methods inherited from class java.net.Socket
bind, connect, connect, getChannel, getLocalSocketAddress, getOOBInline, getOption, getRemoteSocketAddress, getReuseAddress, getTrafficClass, isBound, isClosed, isConnected, isInputShutdown, isOutputShutdown, sendUrgentData, setOOBInline, setOption, setPerformancePreferences, setReuseAddress, setSocketImplFactory, setTrafficClass, supportedOptions
-
-
-
-
Field Detail
-
socket
protected Socket socket
-
-
Constructor Detail
-
WrappedSocket
protected WrappedSocket()
-
WrappedSocket
public WrappedSocket(Socket socket)
-
-
Method Detail
-
getWrappedSocket
public Socket getWrappedSocket()
-
getOutputStream
public OutputStream getOutputStream() throws IOException
- Overrides:
getOutputStreamin classSocket- Throws:
IOException
-
getInputStream
public InputStream getInputStream() throws IOException
- Overrides:
getInputStreamin classSocket- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classSocket- Throws:
IOException
-
getInetAddress
public InetAddress getInetAddress()
- Overrides:
getInetAddressin classSocket
-
getKeepAlive
public boolean getKeepAlive() throws SocketException- Overrides:
getKeepAlivein classSocket- Throws:
SocketException
-
getLocalAddress
public InetAddress getLocalAddress()
- Overrides:
getLocalAddressin classSocket
-
getLocalPort
public int getLocalPort()
- Overrides:
getLocalPortin classSocket
-
getReceiveBufferSize
public int getReceiveBufferSize() throws SocketException- Overrides:
getReceiveBufferSizein classSocket- Throws:
SocketException
-
getSendBufferSize
public int getSendBufferSize() throws SocketException- Overrides:
getSendBufferSizein classSocket- Throws:
SocketException
-
getSoLinger
public int getSoLinger() throws SocketException- Overrides:
getSoLingerin classSocket- Throws:
SocketException
-
getSoTimeout
public int getSoTimeout() throws SocketException- Overrides:
getSoTimeoutin classSocket- Throws:
SocketException
-
getTcpNoDelay
public boolean getTcpNoDelay() throws SocketException- Overrides:
getTcpNoDelayin classSocket- Throws:
SocketException
-
setKeepAlive
public void setKeepAlive(boolean on) throws SocketException- Overrides:
setKeepAlivein classSocket- Throws:
SocketException
-
setReceiveBufferSize
public void setReceiveBufferSize(int size) throws SocketException- Overrides:
setReceiveBufferSizein classSocket- Throws:
SocketException
-
setSendBufferSize
public void setSendBufferSize(int size) throws SocketException- Overrides:
setSendBufferSizein classSocket- Throws:
SocketException
-
setSoLinger
public void setSoLinger(boolean on, int linger) throws SocketException- Overrides:
setSoLingerin classSocket- Throws:
SocketException
-
setSoTimeout
public void setSoTimeout(int timeout) throws SocketException- Overrides:
setSoTimeoutin classSocket- Throws:
SocketException
-
setTcpNoDelay
public void setTcpNoDelay(boolean on) throws SocketException- Overrides:
setTcpNoDelayin classSocket- Throws:
SocketException
-
shutdownInput
public void shutdownInput() throws IOException- Overrides:
shutdownInputin classSocket- Throws:
IOException
-
shutdownOutput
public void shutdownOutput() throws IOException- Overrides:
shutdownOutputin classSocket- Throws:
IOException
-
-