@Deprecated public class SocketHttpServerConnection extends AbstractHttpServerConnection implements HttpInetConnection
| Constructor and Description |
|---|
SocketHttpServerConnection()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
createConnectionMetrics, createEntityDeserializer, createEntitySerializer, createHttpRequestFactory, createRequestParser, createResponseWriter, doFlush, flush, getMetrics, init, isEof, isStale, receiveRequestEntity, receiveRequestHeader, sendResponseEntity, sendResponseHeaderclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetMetrics, isStaleprotected void assertNotOpen()
protected void assertOpen()
AbstractHttpServerConnectionassertOpen in class AbstractHttpServerConnectionprotected 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()
HttpConnectionisOpen in interface HttpConnectionpublic InetAddress getLocalAddress()
getLocalAddress in interface HttpInetConnectionpublic int getLocalPort()
getLocalPort in interface HttpInetConnectionpublic InetAddress getRemoteAddress()
getRemoteAddress in interface HttpInetConnectionpublic int getRemotePort()
getRemotePort in interface HttpInetConnectionpublic void setSocketTimeout(int timeout)
HttpConnectionsetSocketTimeout in interface HttpConnectiontimeout - timeout value in millisecondspublic int getSocketTimeout()
HttpConnectiongetSocketTimeout in interface HttpConnection0 if timeout is disabled or -1 if
timeout is undefined.public void shutdown()
throws IOException
HttpConnectionshutdown in interface HttpConnectionIOExceptionpublic void close()
throws IOException
HttpConnectionshutdown instead.close in interface Closeableclose in interface AutoCloseableclose in interface HttpConnectionIOExceptionCopyright © 2005–2022 The Apache Software Foundation. All rights reserved.