Package org.apache.http.impl
Class SocketHttpClientConnection
- java.lang.Object
-
- org.apache.http.impl.AbstractHttpClientConnection
-
- org.apache.http.impl.SocketHttpClientConnection
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,HttpClientConnection
,HttpConnection
,HttpInetConnection
- Direct Known Subclasses:
DefaultClientConnection
,DefaultHttpClientConnection
@Deprecated public class SocketHttpClientConnection extends AbstractHttpClientConnection implements HttpInetConnection
Deprecated.(4.3) useDefaultBHttpClientConnection
Implementation of a client-side HTTP connection that can be bound to an arbitrarySocket
for receiving data from and transmitting data to a remote server.- Since:
- 4.0
-
-
Constructor Summary
Constructors Constructor Description SocketHttpClientConnection()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
close()
Deprecated.Closes this connection gracefully.java.net.InetAddress
getLocalAddress()
Deprecated.int
getLocalPort()
Deprecated.java.net.InetAddress
getRemoteAddress()
Deprecated.int
getRemotePort()
Deprecated.int
getSocketTimeout()
Deprecated.Returns the socket timeout value.boolean
isOpen()
Deprecated.Checks if this connection is open.void
setSocketTimeout(int timeout)
Deprecated.Sets the socket timeout value.void
shutdown()
Deprecated.Force-closes this connection.java.lang.String
toString()
Deprecated.-
Methods inherited from class org.apache.http.impl.AbstractHttpClientConnection
flush, getMetrics, isResponseAvailable, isStale, receiveResponseEntity, receiveResponseHeader, sendRequestEntity, sendRequestHeader
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.http.HttpConnection
getMetrics, isStale
-
-
-
-
Method Detail
-
isOpen
public boolean isOpen()
Deprecated.Description copied from interface:HttpConnection
Checks if this connection is open.- Specified by:
isOpen
in interfaceHttpConnection
- Returns:
- true if it is open, false if it is closed.
-
getLocalAddress
public java.net.InetAddress getLocalAddress()
Deprecated.- Specified by:
getLocalAddress
in interfaceHttpInetConnection
-
getLocalPort
public int getLocalPort()
Deprecated.- Specified by:
getLocalPort
in interfaceHttpInetConnection
-
getRemoteAddress
public java.net.InetAddress getRemoteAddress()
Deprecated.- Specified by:
getRemoteAddress
in interfaceHttpInetConnection
-
getRemotePort
public int getRemotePort()
Deprecated.- Specified by:
getRemotePort
in interfaceHttpInetConnection
-
setSocketTimeout
public void setSocketTimeout(int timeout)
Deprecated.Description copied from interface:HttpConnection
Sets the socket timeout value.- Specified by:
setSocketTimeout
in interfaceHttpConnection
- Parameters:
timeout
- timeout value in milliseconds
-
getSocketTimeout
public int getSocketTimeout()
Deprecated.Description copied from interface:HttpConnection
Returns the socket timeout value.- Specified by:
getSocketTimeout
in interfaceHttpConnection
- Returns:
- positive value in milliseconds if a timeout is set,
0
if timeout is disabled or-1
if timeout is undefined.
-
shutdown
public void shutdown() throws java.io.IOException
Deprecated.Description copied from interface:HttpConnection
Force-closes this connection. This is the only method of a connection which may be called from a different thread to terminate the connection. This method will not attempt to flush the transmitter's internal buffer prior to closing the underlying socket.- Specified by:
shutdown
in interfaceHttpConnection
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
Deprecated.Description copied from interface:HttpConnection
Closes this connection gracefully. This method will attempt to flush the internal output buffer prior to closing the underlying socket. This method MUST NOT be called from a different thread to force shutdown of the connection. Useshutdown
instead.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Specified by:
close
in interfaceHttpConnection
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toString
in classjava.lang.Object
-
-