Class AbstractSocketWrapper
- java.lang.Object
-
- java.net.Socket
-
- org.eclipse.ecf.provider.filetransfer.events.socket.AbstractSocketWrapper
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public abstract class AbstractSocketWrapper extends Socket
-
-
Constructor Summary
Constructors Constructor Description AbstractSocketWrapper(Socket socket)
-
Method Summary
-
Methods inherited from class java.net.Socket
getChannel, getOption, setOption, setPerformancePreferences, setSocketImplFactory, supportedOptions
-
-
-
-
Constructor Detail
-
AbstractSocketWrapper
public AbstractSocketWrapper(Socket socket)
- Parameters:
socket
- for the wrapper
-
-
Method Detail
-
checkCancel
protected void checkCancel() throws IOException
- Throws:
IOException
- if some problem
-
getSocket
public Socket getSocket()
-
bind
public void bind(SocketAddress bindpoint) throws IOException
- Overrides:
bind
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
-
connect
public void connect(SocketAddress endpoint, int timeout) throws IOException
- Overrides:
connect
in classSocket
- Throws:
IOException
-
connect
public void connect(SocketAddress endpoint) throws IOException
- Overrides:
connect
in classSocket
- Throws:
IOException
-
getInetAddress
public InetAddress getInetAddress()
- Overrides:
getInetAddress
in classSocket
-
getInputStream
public InputStream getInputStream() throws IOException
- Overrides:
getInputStream
in classSocket
- Throws:
IOException
-
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
-
getLocalSocketAddress
public SocketAddress getLocalSocketAddress()
- Overrides:
getLocalSocketAddress
in classSocket
-
getOOBInline
public boolean getOOBInline() throws SocketException
- Overrides:
getOOBInline
in classSocket
- Throws:
SocketException
-
getOutputStream
public OutputStream getOutputStream() throws IOException
- Overrides:
getOutputStream
in classSocket
- Throws:
IOException
-
getReceiveBufferSize
public int getReceiveBufferSize() throws SocketException
- Overrides:
getReceiveBufferSize
in classSocket
- Throws:
SocketException
-
getRemoteSocketAddress
public SocketAddress getRemoteSocketAddress()
- Overrides:
getRemoteSocketAddress
in classSocket
-
getReuseAddress
public boolean getReuseAddress() throws SocketException
- Overrides:
getReuseAddress
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
-
getTrafficClass
public int getTrafficClass() throws SocketException
- Overrides:
getTrafficClass
in classSocket
- Throws:
SocketException
-
isConnected
public boolean isConnected()
- Overrides:
isConnected
in classSocket
-
isInputShutdown
public boolean isInputShutdown()
- Overrides:
isInputShutdown
in classSocket
-
isOutputShutdown
public boolean isOutputShutdown()
- Overrides:
isOutputShutdown
in classSocket
-
sendUrgentData
public void sendUrgentData(int data) throws IOException
- Overrides:
sendUrgentData
in classSocket
- Throws:
IOException
-
setKeepAlive
public void setKeepAlive(boolean on) throws SocketException
- Overrides:
setKeepAlive
in classSocket
- Throws:
SocketException
-
setOOBInline
public void setOOBInline(boolean on) throws SocketException
- Overrides:
setOOBInline
in classSocket
- Throws:
SocketException
-
setReceiveBufferSize
public void setReceiveBufferSize(int size) throws SocketException
- Overrides:
setReceiveBufferSize
in classSocket
- Throws:
SocketException
-
setReuseAddress
public void setReuseAddress(boolean on) throws SocketException
- Overrides:
setReuseAddress
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
-
setTrafficClass
public void setTrafficClass(int tc) throws SocketException
- Overrides:
setTrafficClass
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
-
-