Package com.enterprisedt.util.proxy
Class HttpProxySocket
java.lang.Object
java.net.Socket
com.enterprisedt.util.proxy.HttpProxySocket
- All Implemented Interfaces:
StreamSocket,Closeable,AutoCloseable
- Version:
- $Revision$
- Author:
- $author$
-
Method Summary
Modifier and TypeMethodDescriptionstatic HttpProxySocketconnectViaProxy(String host, int port, String proxyHost, int proxyPort, String username, String password, int timeout, String userAgent) static HttpProxySocketconnectViaProxy(String host, int port, String proxyHost, int proxyPort, String protocol, String username, String password, int timeout, String userAgent) Get details about the socketGet the actual hostnamebooleanIs this socket in secure mode?voidsetRemoteHost(String remoteHost) Set the remote hostnametoString()Methods inherited from class java.net.Socket
bind, close, connect, connect, getChannel, getInetAddress, getInputStream, getKeepAlive, getLocalAddress, getLocalPort, getLocalSocketAddress, getOOBInline, getOption, getOutputStream, getPort, getReceiveBufferSize, getRemoteSocketAddress, getReuseAddress, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, getTrafficClass, isBound, isClosed, isConnected, isInputShutdown, isOutputShutdown, sendUrgentData, setKeepAlive, setOOBInline, setOption, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSocketImplFactory, setSoLinger, setSoTimeout, setTcpNoDelay, setTrafficClass, shutdownInput, shutdownOutput, supportedOptionsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.enterprisedt.util.proxy.StreamSocket
close, getInetAddress, getInputStream, getLocalAddress, getLocalPort, getOutputStream, getReceiveBufferSize, getSendBufferSize, getSoTimeout, isConnected, setReceiveBufferSize, setSendBufferSize, setSoTimeout
-
Method Details
-
isSecureMode
public boolean isSecureMode()Is this socket in secure mode?- Specified by:
isSecureModein interfaceStreamSocket- Returns:
- true if secure mode
-
getRemoteHost
Get the actual hostname- Specified by:
getRemoteHostin interfaceStreamSocket- Returns:
- remote hostname
-
setRemoteHost
Set the remote hostname- Specified by:
setRemoteHostin interfaceStreamSocket- Parameters:
remoteHost- remote hostname
-
connectViaProxy
public static HttpProxySocket connectViaProxy(String host, int port, String proxyHost, int proxyPort, String username, String password, int timeout, String userAgent) throws IOException, UnknownHostException - Parameters:
host-port-proxyHost-proxyPort-username-password-userAgent-- Returns:
- Throws:
IOExceptionUnknownHostException
-
connectViaProxy
public static HttpProxySocket connectViaProxy(String host, int port, String proxyHost, int proxyPort, String protocol, String username, String password, int timeout, String userAgent) throws IOException, UnknownHostException - Parameters:
host-port-proxyHost-proxyPort-protocol-username-password-userAgent-- Returns:
- Throws:
IOExceptionUnknownHostExceptionSocketException
-
toString
-
getResponseHeader
- Returns:
-
getDetail
Description copied from interface:StreamSocketGet details about the socket- Specified by:
getDetailin interfaceStreamSocket- Returns:
-