|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.http.impl.AbstractHttpServerConnection
org.apache.http.impl.SocketHttpServerConnection
public class SocketHttpServerConnection
Implementation of a server-side HTTP connection that can be bound to a network Socket in order to receive and transmit data.
Constructor Summary | |
---|---|
SocketHttpServerConnection()
|
Method Summary | |
---|---|
protected void |
assertNotOpen()
|
protected void |
assertOpen()
|
protected void |
bind(java.net.Socket socket,
HttpParams params)
|
void |
close()
Closes this connection gracefully. |
protected HttpDataReceiver |
createHttpDataReceiver(java.net.Socket socket,
int buffersize,
HttpParams params)
|
protected HttpDataTransmitter |
createHttpDataTransmitter(java.net.Socket socket,
int buffersize,
HttpParams params)
|
java.net.InetAddress |
getLocalAddress()
|
int |
getLocalPort()
|
java.net.InetAddress |
getRemoteAddress()
|
int |
getRemotePort()
|
protected java.net.Socket |
getSocket()
|
int |
getSocketTimeout()
Returns the socket timeout value. |
boolean |
isOpen()
Checks if this connection is open. |
void |
setSocketTimeout(int timeout)
Sets the socket timeout value. |
void |
shutdown()
Force-closes this connection. |
Methods inherited from class org.apache.http.impl.AbstractHttpServerConnection |
---|
createEntityDeserializer, createEntitySerializer, createHttpRequestFactory, doFlush, flush, getMetrics, init, isStale, receiveRequestEntity, receiveRequestHeader, receiveRequestHeaders, receiveRequestLine, sendResponseEntity, sendResponseHeader, sendResponseHeaders, sendResponseStatusLine |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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()
assertOpen
in class AbstractHttpServerConnection
protected HttpDataReceiver createHttpDataReceiver(java.net.Socket socket, int buffersize, HttpParams params) throws java.io.IOException
java.io.IOException
protected HttpDataTransmitter createHttpDataTransmitter(java.net.Socket socket, int buffersize, HttpParams params) throws java.io.IOException
java.io.IOException
protected void bind(java.net.Socket socket, HttpParams params) throws java.io.IOException
java.io.IOException
protected java.net.Socket getSocket()
public boolean isOpen()
HttpConnection
isOpen
in interface HttpConnection
public java.net.InetAddress getLocalAddress()
getLocalAddress
in interface HttpInetConnection
public int getLocalPort()
getLocalPort
in interface HttpInetConnection
public java.net.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 java.io.IOException
HttpConnection
shutdown
in interface HttpConnection
java.io.IOException
public void close() throws java.io.IOException
HttpConnection
shutdown
instead.
close
in interface HttpConnection
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |