Package org.apache.http.impl
Class SocketHttpClientConnection
java.lang.Object
org.apache.http.impl.AbstractHttpClientConnection
org.apache.http.impl.SocketHttpClientConnection
- All Implemented Interfaces:
Closeable,AutoCloseable,HttpClientConnection,HttpConnection,HttpInetConnection
- Direct Known Subclasses:
DefaultClientConnection,DefaultHttpClientConnection
@Deprecated
public class SocketHttpClientConnection
extends AbstractHttpClientConnection
implements HttpInetConnection
Deprecated.
Implementation of a client-side HTTP connection that can be bound to an
arbitrary
Socket for receiving data from and transmitting data to
a remote server.- Since:
- 4.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Deprecated.Closes this connection gracefully.Deprecated.intDeprecated.Deprecated.intDeprecated.intDeprecated.Returns the socket timeout value.booleanisOpen()Deprecated.Checks if this connection is open.voidsetSocketTimeout(int timeout) Deprecated.Sets the socket timeout value.voidshutdown()Deprecated.Force-closes this connection.toString()Deprecated.Methods inherited from class org.apache.http.impl.AbstractHttpClientConnection
flush, getMetrics, isResponseAvailable, isStale, receiveResponseEntity, receiveResponseHeader, sendRequestEntity, sendRequestHeaderMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.http.HttpConnection
getMetrics, isStale
-
Constructor Details
-
SocketHttpClientConnection
public SocketHttpClientConnection()Deprecated.
-
-
Method Details
-
isOpen
public boolean isOpen()Deprecated.Description copied from interface:HttpConnectionChecks if this connection is open.- Specified by:
isOpenin interfaceHttpConnection- Returns:
- true if it is open, false if it is closed.
-
getLocalAddress
Deprecated.- Specified by:
getLocalAddressin interfaceHttpInetConnection
-
getLocalPort
public int getLocalPort()Deprecated.- Specified by:
getLocalPortin interfaceHttpInetConnection
-
getRemoteAddress
Deprecated.- Specified by:
getRemoteAddressin interfaceHttpInetConnection
-
getRemotePort
public int getRemotePort()Deprecated.- Specified by:
getRemotePortin interfaceHttpInetConnection
-
setSocketTimeout
public void setSocketTimeout(int timeout) Deprecated.Description copied from interface:HttpConnectionSets the socket timeout value.- Specified by:
setSocketTimeoutin interfaceHttpConnection- Parameters:
timeout- timeout value in milliseconds
-
getSocketTimeout
public int getSocketTimeout()Deprecated.Description copied from interface:HttpConnectionReturns the socket timeout value.- Specified by:
getSocketTimeoutin interfaceHttpConnection- Returns:
- positive value in milliseconds if a timeout is set,
0if timeout is disabled or-1if timeout is undefined.
-
shutdown
Deprecated.Description copied from interface:HttpConnectionForce-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:
shutdownin interfaceHttpConnection- Throws:
IOException
-
close
Deprecated.Description copied from interface:HttpConnectionCloses 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. Useshutdowninstead.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceHttpConnection- Throws:
IOException
-
toString
Deprecated.
-
DefaultBHttpClientConnection