|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.http.impl.AbstractHttpServerConnection org.apache.http.impl.SocketHttpServerConnection
@Deprecated public class SocketHttpServerConnection
Constructor Summary | |
---|---|
SocketHttpServerConnection()
Deprecated. |
Method Summary | |
---|---|
protected void |
assertNotOpen()
Deprecated. |
protected void |
assertOpen()
Deprecated. Asserts if the connection is open. |
protected void |
bind(Socket socket,
HttpParams params)
Deprecated. Binds this connection to the given Socket . |
void |
close()
Deprecated. Closes this connection gracefully. |
protected SessionInputBuffer |
createSessionInputBuffer(Socket socket,
int bufferSize,
HttpParams params)
Deprecated. Creates an instance of SocketInputBuffer to be used for
receiving data from the given Socket . |
protected SessionOutputBuffer |
createSessionOutputBuffer(Socket socket,
int bufferSize,
HttpParams params)
Deprecated. Creates an instance of SessionOutputBuffer to be used for
sending data to the given Socket . |
InetAddress |
getLocalAddress()
Deprecated. |
int |
getLocalPort()
Deprecated. |
InetAddress |
getRemoteAddress()
Deprecated. |
int |
getRemotePort()
Deprecated. |
protected Socket |
getSocket()
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. |
String |
toString()
Deprecated. |
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.http.HttpConnection |
---|
getMetrics, isStale |
Constructor Detail |
---|
public SocketHttpServerConnection()
Method Detail |
---|
protected void assertNotOpen()
protected void assertOpen()
AbstractHttpServerConnection
assertOpen
in class AbstractHttpServerConnection
protected SessionInputBuffer createSessionInputBuffer(Socket socket, int bufferSize, HttpParams params) throws IOException
SocketInputBuffer
to be used for
receiving data from the given Socket
.
This method can be overridden in a super class in order to provide
a custom implementation of SessionInputBuffer
interface.
socket
- the socket.bufferSize
- the buffer size.params
- HTTP parameters.
IOException
- in case of an I/O error.SocketInputBuffer.SocketInputBuffer(Socket, int, HttpParams)
protected SessionOutputBuffer createSessionOutputBuffer(Socket socket, int bufferSize, HttpParams params) throws IOException
SessionOutputBuffer
to be used for
sending data to the given Socket
.
This method can be overridden in a super class in order to provide
a custom implementation of SocketOutputBuffer
interface.
socket
- the socket.bufferSize
- the buffer size.params
- HTTP parameters.
IOException
- in case of an I/O error.SocketOutputBuffer.SocketOutputBuffer(Socket, int, HttpParams)
protected void bind(Socket socket, HttpParams params) throws IOException
Socket
. This socket will be
used by the connection to send and receive data.
This method will invoke createSessionInputBuffer(Socket, int, HttpParams)
and 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 isOpen()
will return true
.
socket
- the socket.params
- HTTP parameters.
IOException
- in case of an I/O error.protected Socket getSocket()
public boolean isOpen()
HttpConnection
isOpen
in interface HttpConnection
public InetAddress getLocalAddress()
getLocalAddress
in interface HttpInetConnection
public int getLocalPort()
getLocalPort
in interface HttpInetConnection
public InetAddress getRemoteAddress()
getRemoteAddress
in interface HttpInetConnection
public int getRemotePort()
getRemotePort
in interface HttpInetConnection
public void setSocketTimeout(int timeout)
HttpConnection
setSocketTimeout
in interface HttpConnection
timeout
- timeout value in millisecondspublic int getSocketTimeout()
HttpConnection
getSocketTimeout
in interface HttpConnection
0
if timeout is disabled or -1
if
timeout is undefined.public void shutdown() throws IOException
HttpConnection
shutdown
in interface HttpConnection
IOException
public void close() throws IOException
HttpConnection
shutdown
instead.
close
in interface Closeable
close
in interface HttpConnection
IOException
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |