com.enterprisedt.util.proxy
Class HttpProxySocket

java.lang.Object
  extended by java.net.Socket
      extended by com.enterprisedt.util.proxy.HttpProxySocket
All Implemented Interfaces:
StreamSocket

public class HttpProxySocket
extends java.net.Socket
implements StreamSocket

Version:
$Revision: 1.6 $
Author:
$author$

Method Summary
static HttpProxySocket connectViaProxy(java.lang.String host, int port, java.lang.String proxyHost, int proxyPort, java.lang.String username, java.lang.String password, int timeout, java.lang.String userAgent)
           
static HttpProxySocket connectViaProxy(java.lang.String host, int port, java.lang.String proxyHost, int proxyPort, java.lang.String protocol, java.lang.String username, java.lang.String password, int timeout, java.lang.String userAgent)
           
 java.lang.String getDetail()
          Get details about the socket
 java.lang.String getRemoteHost()
          Get the actual hostname
 HttpHeader getResponseHeader()
           
 boolean isSecureMode()
          Is this socket in secure mode?
 void setRemoteHost(java.lang.String remoteHost)
          Set the remote hostname
 java.lang.String toString()
           
 
Methods inherited from class java.net.Socket
bind, close, connect, connect, getChannel, getInetAddress, getInputStream, getKeepAlive, getLocalAddress, getLocalPort, getLocalSocketAddress, getOOBInline, getOutputStream, getPort, getReceiveBufferSize, getRemoteSocketAddress, getReuseAddress, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, getTrafficClass, isBound, isClosed, isConnected, isInputShutdown, isOutputShutdown, sendUrgentData, setKeepAlive, setOOBInline, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSocketImplFactory, setSoLinger, setSoTimeout, setTcpNoDelay, setTrafficClass, shutdownInput, shutdownOutput
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.enterprisedt.util.proxy.StreamSocket
close, getInetAddress, getInputStream, getLocalAddress, getLocalPort, getOutputStream, getReceiveBufferSize, getSendBufferSize, getSoTimeout, isConnected, setReceiveBufferSize, setSendBufferSize, setSoTimeout
 

Method Detail

isSecureMode

public boolean isSecureMode()
Is this socket in secure mode?

Specified by:
isSecureMode in interface StreamSocket
Returns:
true if secure mode

getRemoteHost

public java.lang.String getRemoteHost()
Get the actual hostname

Specified by:
getRemoteHost in interface StreamSocket
Returns:
remote hostname

setRemoteHost

public void setRemoteHost(java.lang.String remoteHost)
Set the remote hostname

Specified by:
setRemoteHost in interface StreamSocket
Parameters:
remoteHost - remote hostname

connectViaProxy

public static HttpProxySocket connectViaProxy(java.lang.String host,
                                              int port,
                                              java.lang.String proxyHost,
                                              int proxyPort,
                                              java.lang.String username,
                                              java.lang.String password,
                                              int timeout,
                                              java.lang.String userAgent)
                                       throws java.io.IOException,
                                              java.net.UnknownHostException
Parameters:
host -
port -
proxyHost -
proxyPort -
username -
password -
userAgent -
Returns:
Throws:
java.io.IOException
java.net.UnknownHostException

connectViaProxy

public static HttpProxySocket connectViaProxy(java.lang.String host,
                                              int port,
                                              java.lang.String proxyHost,
                                              int proxyPort,
                                              java.lang.String protocol,
                                              java.lang.String username,
                                              java.lang.String password,
                                              int timeout,
                                              java.lang.String userAgent)
                                       throws java.io.IOException,
                                              java.net.UnknownHostException
Parameters:
host -
port -
proxyHost -
proxyPort -
protocol -
username -
password -
userAgent -
Returns:
Throws:
java.io.IOException
java.net.UnknownHostException
java.net.SocketException

toString

public java.lang.String toString()
Overrides:
toString in class java.net.Socket
Returns:

getResponseHeader

public HttpHeader getResponseHeader()
Returns:

getDetail

public java.lang.String getDetail()
Description copied from interface: StreamSocket
Get details about the socket

Specified by:
getDetail in interface StreamSocket
Returns:


Copyright © 2001-2011 Enterprise Distributed Technologies Ltd. All Rights Reserved.