org.apache.http.impl
Class DefaultHttpServerConnection
java.lang.Object
org.apache.http.impl.AbstractHttpServerConnection
org.apache.http.impl.SocketHttpServerConnection
org.apache.http.impl.DefaultHttpServerConnection
- All Implemented Interfaces:
- HttpConnection, HttpInetConnection, HttpServerConnection
public class DefaultHttpServerConnection
- extends SocketHttpServerConnection
Default implementation of a server-side HTTP connection.
The following parameters can be used to customize the behavior of this
class:
- Since:
- 4.0
Methods inherited from class org.apache.http.impl.SocketHttpServerConnection |
assertNotOpen, assertOpen, close, createHttpDataReceiver, createHttpDataTransmitter, createSessionInputBuffer, createSessionOutputBuffer, getLocalAddress, getLocalPort, getRemoteAddress, getRemotePort, getSocket, getSocketTimeout, isOpen, setSocketTimeout, shutdown |
Methods inherited from class org.apache.http.impl.AbstractHttpServerConnection |
createConnectionMetrics, createEntityDeserializer, createEntitySerializer, createHttpRequestFactory, createRequestParser, createResponseWriter, doFlush, flush, getMetrics, init, isEof, isStale, receiveRequestEntity, receiveRequestHeader, sendResponseEntity, sendResponseHeader |
DefaultHttpServerConnection
public DefaultHttpServerConnection()
bind
public void bind(Socket socket,
HttpParams params)
throws IOException
- Description copied from class:
SocketHttpServerConnection
- Binds this connection to the given
Socket
. This socket will be
used by the connection to send and receive data.
This method will invoke SocketHttpServerConnection.createSessionInputBuffer(Socket, int, HttpParams)
and SocketHttpServerConnection.createSessionOutputBuffer(Socket, int, HttpParams)
methods
to create session input / output buffers bound to this socket and then
will invoke AbstractHttpServerConnection.init(SessionInputBuffer, SessionOutputBuffer, HttpParams)
method to pass references to those buffers to the underlying HTTP message
parser and formatter.
After this method's execution the connection status will be reported
as open and the SocketHttpServerConnection.isOpen()
will return true
.
- Overrides:
bind
in class SocketHttpServerConnection
- Parameters:
socket
- the socket.params
- HTTP parameters.
- Throws:
IOException
- in case of an I/O error.
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2005-2010 The Apache Software Foundation. All Rights Reserved.