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 protected
WrappedSocket()
WrappedSocket(Socket socket)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
InetAddress
getInetAddress()
InputStream
getInputStream()
boolean
getKeepAlive()
InetAddress
getLocalAddress()
int
getLocalPort()
OutputStream
getOutputStream()
int
getPort()
int
getReceiveBufferSize()
int
getSendBufferSize()
int
getSoLinger()
int
getSoTimeout()
boolean
getTcpNoDelay()
Socket
getWrappedSocket()
void
setKeepAlive(boolean on)
void
setReceiveBufferSize(int size)
void
setSendBufferSize(int size)
void
setSoLinger(boolean on, int linger)
void
setSoTimeout(int timeout)
void
setTcpNoDelay(boolean on)
void
shutdownInput()
void
shutdownOutput()
String
toString()
-
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:
getOutputStream
in classSocket
- Throws:
IOException
-
getInputStream
public InputStream getInputStream() throws IOException
- Overrides:
getInputStream
in classSocket
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classSocket
- Throws:
IOException
-
getInetAddress
public InetAddress getInetAddress()
- Overrides:
getInetAddress
in classSocket
-
getKeepAlive
public boolean getKeepAlive() throws SocketException
- Overrides:
getKeepAlive
in classSocket
- Throws:
SocketException
-
getLocalAddress
public InetAddress getLocalAddress()
- Overrides:
getLocalAddress
in classSocket
-
getLocalPort
public int getLocalPort()
- Overrides:
getLocalPort
in classSocket
-
getReceiveBufferSize
public int getReceiveBufferSize() throws SocketException
- Overrides:
getReceiveBufferSize
in classSocket
- Throws:
SocketException
-
getSendBufferSize
public int getSendBufferSize() throws SocketException
- Overrides:
getSendBufferSize
in classSocket
- Throws:
SocketException
-
getSoLinger
public int getSoLinger() throws SocketException
- Overrides:
getSoLinger
in classSocket
- Throws:
SocketException
-
getSoTimeout
public int getSoTimeout() throws SocketException
- Overrides:
getSoTimeout
in classSocket
- Throws:
SocketException
-
getTcpNoDelay
public boolean getTcpNoDelay() throws SocketException
- Overrides:
getTcpNoDelay
in classSocket
- Throws:
SocketException
-
setKeepAlive
public void setKeepAlive(boolean on) throws SocketException
- Overrides:
setKeepAlive
in classSocket
- Throws:
SocketException
-
setReceiveBufferSize
public void setReceiveBufferSize(int size) throws SocketException
- Overrides:
setReceiveBufferSize
in classSocket
- Throws:
SocketException
-
setSendBufferSize
public void setSendBufferSize(int size) throws SocketException
- Overrides:
setSendBufferSize
in classSocket
- Throws:
SocketException
-
setSoLinger
public void setSoLinger(boolean on, int linger) throws SocketException
- Overrides:
setSoLinger
in classSocket
- Throws:
SocketException
-
setSoTimeout
public void setSoTimeout(int timeout) throws SocketException
- Overrides:
setSoTimeout
in classSocket
- Throws:
SocketException
-
setTcpNoDelay
public void setTcpNoDelay(boolean on) throws SocketException
- Overrides:
setTcpNoDelay
in classSocket
- Throws:
SocketException
-
shutdownInput
public void shutdownInput() throws IOException
- Overrides:
shutdownInput
in classSocket
- Throws:
IOException
-
shutdownOutput
public void shutdownOutput() throws IOException
- Overrides:
shutdownOutput
in classSocket
- Throws:
IOException
-
-