public final class SMProxySocketWrapper
extends java.net.Socket
This class is never meant to be used by a toolkit application
| Constructor and Description |
|---|
SMProxySocketWrapper(java.net.Socket socket,
SMProxyWrapper wrapper)
Creates an SMProxy wrapped socket
|
| Modifier and Type | Method and Description |
|---|---|
void |
bind(java.net.SocketAddress bindpoint) |
void |
close() |
void |
connect(java.net.SocketAddress endpoint)
Make a connection to an unconnected socket at the specified
endpoint.
|
void |
connect(java.net.SocketAddress endpoint,
int timeout) |
java.nio.channels.SocketChannel |
getChannel() |
java.net.InetAddress |
getInetAddress() |
EntrustSSLSocketFactory.InetHandling |
getInetAddressHandling()
Return how the socket should be configured when created with
an InetAddress
|
java.io.InputStream |
getInputStream()
Override the default InputStream with the SMProxyInputStream
|
boolean |
getKeepAlive() |
java.net.InetAddress |
getLocalAddress() |
int |
getLocalPort() |
java.net.SocketAddress |
getLocalSocketAddress() |
boolean |
getOOBInline() |
java.io.OutputStream |
getOutputStream()
Override the default OutputStream with the SMProxyOutputStream
|
int |
getPort() |
int |
getReceiveBufferSize() |
java.net.SocketAddress |
getRemoteSocketAddress() |
boolean |
getReuseAddress() |
int |
getSendBufferSize() |
int |
getSoLinger() |
int |
getSoTimeout() |
boolean |
getTcpNoDelay() |
int |
getTrafficClass() |
boolean |
isBound() |
boolean |
isClosed() |
boolean |
isConnected() |
boolean |
isInputShutdown() |
boolean |
isOutputShutdown() |
void |
sendUrgentData(int data) |
void |
setInetAddressHandling(EntrustSSLSocketFactory.InetHandling handling)
This API allows the socket to be configured with how a Socket created
with the InetAddress class should be handled.
|
void |
setKeepAlive(boolean on) |
void |
setOOBInline(boolean on) |
void |
setPerformancePreferences(int connectionTime,
int latency,
int bandwidth) |
void |
setReceiveBufferSize(int size) |
void |
setReuseAddress(boolean on) |
void |
setSendBufferSize(int size) |
void |
setSoLinger(boolean on,
int l) |
void |
setSoTimeout(int timeout) |
void |
setTcpNoDelay(boolean on) |
void |
setTrafficClass(int tc) |
void |
shutdownInput() |
void |
shutdownOutput() |
java.lang.String |
toString() |
public SMProxySocketWrapper(java.net.Socket socket,
SMProxyWrapper wrapper)
socket - the Socket to wrapwrapper - the wrapperpublic void setInetAddressHandling(EntrustSSLSocketFactory.InetHandling handling)
public enum InetHandling {HOSTNAME, IPADDRESS, REJECT, COMPAT}
Note: Using a hostname to create the socket is always safe.
handling - InetHandling enumerated type.public EntrustSSLSocketFactory.InetHandling getInetAddressHandling() throws java.io.IOException
REJECT which will throw an exception
HOSTNAME which will assume InetAddress is created with a hostname
IPADDRESS which will assume InetAddress is created with an IP
COMPAT - Compatible with previous versions of the toolkit. Uses Session.getPeerHost
to lookup the hostname
java.io.IOExceptionpublic void connect(java.net.SocketAddress endpoint,
int timeout)
throws java.io.IOException
connect in class java.net.Socketjava.io.IOExceptionpublic void connect(java.net.SocketAddress endpoint)
throws java.io.IOException
connect in class java.net.Socketjava.io.IOExceptionpublic java.nio.channels.SocketChannel getChannel()
getChannel in class java.net.Socketpublic java.net.InetAddress getInetAddress()
getInetAddress in class java.net.Socketpublic boolean getKeepAlive()
throws java.net.SocketException
getKeepAlive in class java.net.Socketjava.net.SocketExceptionpublic java.net.InetAddress getLocalAddress()
getLocalAddress in class java.net.Socketpublic int getLocalPort()
getLocalPort in class java.net.Socketpublic java.net.SocketAddress getLocalSocketAddress()
getLocalSocketAddress in class java.net.Socketpublic boolean getOOBInline()
throws java.net.SocketException
getOOBInline in class java.net.Socketjava.net.SocketExceptionpublic int getPort()
getPort in class java.net.Socketpublic int getReceiveBufferSize()
throws java.net.SocketException
getReceiveBufferSize in class java.net.Socketjava.net.SocketExceptionpublic java.net.SocketAddress getRemoteSocketAddress()
getRemoteSocketAddress in class java.net.Socketpublic boolean getReuseAddress()
throws java.net.SocketException
getReuseAddress in class java.net.Socketjava.net.SocketExceptionpublic int getSendBufferSize()
throws java.net.SocketException
getSendBufferSize in class java.net.Socketjava.net.SocketExceptionpublic int getSoLinger()
throws java.net.SocketException
getSoLinger in class java.net.Socketjava.net.SocketExceptionpublic int getSoTimeout()
throws java.net.SocketException
getSoTimeout in class java.net.Socketjava.net.SocketExceptionpublic boolean getTcpNoDelay()
throws java.net.SocketException
getTcpNoDelay in class java.net.Socketjava.net.SocketExceptionpublic int getTrafficClass()
throws java.net.SocketException
getTrafficClass in class java.net.Socketjava.net.SocketExceptionpublic boolean isBound()
isBound in class java.net.Socketpublic boolean isClosed()
isClosed in class java.net.Socketpublic boolean isConnected()
isConnected in class java.net.Socketpublic boolean isInputShutdown()
isInputShutdown in class java.net.Socketpublic boolean isOutputShutdown()
isOutputShutdown in class java.net.Socketpublic void sendUrgentData(int data)
throws java.io.IOException
sendUrgentData in class java.net.Socketjava.io.IOExceptionpublic void setKeepAlive(boolean on)
throws java.net.SocketException
setKeepAlive in class java.net.Socketjava.net.SocketExceptionpublic void setOOBInline(boolean on)
throws java.net.SocketException
setOOBInline in class java.net.Socketjava.net.SocketExceptionpublic void setReceiveBufferSize(int size)
throws java.net.SocketException
setReceiveBufferSize in class java.net.Socketjava.net.SocketExceptionpublic void setReuseAddress(boolean on)
throws java.net.SocketException
setReuseAddress in class java.net.Socketjava.net.SocketExceptionpublic void setSendBufferSize(int size)
throws java.net.SocketException
setSendBufferSize in class java.net.Socketjava.net.SocketExceptionpublic void setSoLinger(boolean on,
int l)
throws java.net.SocketException
setSoLinger in class java.net.Socketjava.net.SocketExceptionpublic void setSoTimeout(int timeout)
throws java.net.SocketException
setSoTimeout in class java.net.Socketjava.net.SocketExceptionpublic void setTcpNoDelay(boolean on)
throws java.net.SocketException
setTcpNoDelay in class java.net.Socketjava.net.SocketExceptionpublic void setTrafficClass(int tc)
throws java.net.SocketException
setTrafficClass in class java.net.Socketjava.net.SocketExceptionpublic void shutdownInput()
throws java.io.IOException
shutdownInput in class java.net.Socketjava.io.IOExceptionpublic void shutdownOutput()
throws java.io.IOException
shutdownOutput in class java.net.Socketjava.io.IOExceptionpublic java.lang.String toString()
toString in class java.net.Socketpublic void setPerformancePreferences(int connectionTime,
int latency,
int bandwidth)
setPerformancePreferences in class java.net.Socketpublic void bind(java.net.SocketAddress bindpoint)
throws java.io.IOException
bind in class java.net.Socketjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.net.Socketjava.io.IOExceptionpublic java.io.InputStream getInputStream()
throws java.io.IOException
getInputStream in class java.net.Socketjava.io.IOExceptionpublic java.io.OutputStream getOutputStream()
throws java.io.IOException
getOutputStream in class java.net.Socketjava.io.IOException