|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.synapse.transport.nhttp.ServerHandler
public class ServerHandler
The server connection handler. An instance of this class is used by each IOReactor, to process every connection. Hence this class should not store any data related to a single connection - as this is being shared.
Field Summary | |
---|---|
static String |
CONNECTION_CREATION_TIME
|
static String |
REQUEST_SINK_BUFFER
|
static String |
RESPONSE_SOURCE_BUFFER
|
static String |
SERVER_CONNECTION_DEBUG
|
Constructor Summary | |
---|---|
ServerHandler(ListenerContext listenerContext)
|
Method Summary | |
---|---|
void |
closed(org.apache.http.nio.NHttpServerConnection conn)
|
void |
commitResponse(org.apache.http.nio.NHttpServerConnection conn,
org.apache.http.HttpResponse response)
Commit the response to the connection. |
void |
commitResponseHideExceptions(org.apache.http.nio.NHttpServerConnection conn,
org.apache.http.HttpResponse response)
Commit the response to the connection. |
void |
connected(org.apache.http.nio.NHttpServerConnection conn)
|
void |
exception(org.apache.http.nio.NHttpServerConnection conn,
org.apache.http.HttpException e)
Handle HTTP Protocol violations with an error response |
void |
exception(org.apache.http.nio.NHttpServerConnection conn,
IOException e)
Handle IO errors while reading or writing to underlying channels |
int |
getActiveConnectionsSize()
|
int |
getActiveCount()
|
org.apache.axis2.transport.base.MetricsCollector |
getMetrics()
|
int |
getQueueSize()
|
void |
inputReady(org.apache.http.nio.NHttpServerConnection conn,
org.apache.http.nio.ContentDecoder decoder)
Process ready input by writing it into the Pipe |
void |
markActiveConnectionsToBeClosed()
|
void |
outputReady(org.apache.http.nio.NHttpServerConnection conn,
org.apache.http.nio.ContentEncoder encoder)
Process ready output by writing into the channel |
void |
requestReceived(org.apache.http.nio.NHttpServerConnection conn)
Process a new incoming request |
void |
responseReady(org.apache.http.nio.NHttpServerConnection conn)
|
void |
stop()
|
void |
timeout(org.apache.http.nio.NHttpServerConnection conn)
Handle connection timeouts by shutting down the connections |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REQUEST_SINK_BUFFER
public static final String RESPONSE_SOURCE_BUFFER
public static final String CONNECTION_CREATION_TIME
public static final String SERVER_CONNECTION_DEBUG
Constructor Detail |
---|
public ServerHandler(ListenerContext listenerContext)
Method Detail |
---|
public void requestReceived(org.apache.http.nio.NHttpServerConnection conn)
requestReceived
in interface org.apache.http.nio.NHttpServiceHandler
conn
- the connectionpublic void inputReady(org.apache.http.nio.NHttpServerConnection conn, org.apache.http.nio.ContentDecoder decoder)
inputReady
in interface org.apache.http.nio.NHttpServiceHandler
conn
- the connection being processeddecoder
- the content decoder in usepublic void outputReady(org.apache.http.nio.NHttpServerConnection conn, org.apache.http.nio.ContentEncoder encoder)
outputReady
in interface org.apache.http.nio.NHttpServiceHandler
conn
- the connection being processedencoder
- the content encoder in usepublic void commitResponseHideExceptions(org.apache.http.nio.NHttpServerConnection conn, org.apache.http.HttpResponse response)
conn
- the connection being processedresponse
- the response to commit over the connectionpublic void commitResponse(org.apache.http.nio.NHttpServerConnection conn, org.apache.http.HttpResponse response) throws IOException, org.apache.http.HttpException
conn
- the connection being processedresponse
- the response to commit over the connection
IOException
- if an IO error occurs while sending the response
org.apache.http.HttpException
- if a HTTP protocol violation occurs while sending the responsepublic void timeout(org.apache.http.nio.NHttpServerConnection conn)
timeout
in interface org.apache.http.nio.NHttpServiceHandler
conn
- the connection being processedpublic void connected(org.apache.http.nio.NHttpServerConnection conn)
connected
in interface org.apache.http.nio.NHttpServiceHandler
public void responseReady(org.apache.http.nio.NHttpServerConnection conn)
responseReady
in interface org.apache.http.nio.NHttpServiceHandler
public void closed(org.apache.http.nio.NHttpServerConnection conn)
closed
in interface org.apache.http.nio.NHttpServiceHandler
public void markActiveConnectionsToBeClosed()
public void exception(org.apache.http.nio.NHttpServerConnection conn, org.apache.http.HttpException e)
exception
in interface org.apache.http.nio.NHttpServiceHandler
conn
- the connection being processede
- the exception encounteredpublic void exception(org.apache.http.nio.NHttpServerConnection conn, IOException e)
exception
in interface org.apache.http.nio.NHttpServiceHandler
conn
- the connection being processede
- the exception encounteredpublic int getActiveConnectionsSize()
public int getActiveCount()
public int getQueueSize()
public org.apache.axis2.transport.base.MetricsCollector getMetrics()
public void stop()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |