public class SourceHandler extends Object implements org.apache.http.nio.NHttpServerEventHandler
Modifier and Type | Field and Description |
---|---|
static String |
MESSAGE_SIZE_VALIDATION |
static String |
PROPERTY_FILE |
static String |
VALID_MAX_MESSAGE_SIZE |
Constructor and Description |
---|
SourceHandler(SourceConfiguration sourceConfiguration) |
Modifier and Type | Method and Description |
---|---|
void |
closed(org.apache.http.nio.NHttpServerConnection conn) |
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 |
endOfInput(org.apache.http.nio.NHttpServerConnection conn) |
void |
exception(org.apache.http.nio.NHttpServerConnection conn,
Exception ex) |
OutputStream |
getOutputStream(String method,
SourceRequest request)
Create synapse.response-source-buffer for GET and HEAD Http methods
|
SourceRequest |
getSourceRequest(org.apache.http.nio.NHttpServerConnection conn)
Create SourceRequest from NHttpServerConnection conn
|
void |
informReaderError(org.apache.http.nio.NHttpServerConnection conn) |
void |
informWriterError(org.apache.http.nio.NHttpServerConnection conn) |
void |
inputReady(org.apache.http.nio.NHttpServerConnection conn,
org.apache.http.nio.ContentDecoder decoder) |
void |
logIOException(org.apache.http.nio.NHttpServerConnection conn,
IOException e) |
void |
outputReady(org.apache.http.nio.NHttpServerConnection conn,
org.apache.http.nio.ContentEncoder encoder) |
void |
requestReceived(org.apache.http.nio.NHttpServerConnection conn) |
void |
responseReady(org.apache.http.nio.NHttpServerConnection conn) |
void |
stop()
Shutting down the thread pools.
|
void |
timeout(org.apache.http.nio.NHttpServerConnection conn) |
public static final String PROPERTY_FILE
public static final String MESSAGE_SIZE_VALIDATION
public static final String VALID_MAX_MESSAGE_SIZE
public SourceHandler(SourceConfiguration sourceConfiguration)
public void connected(org.apache.http.nio.NHttpServerConnection conn)
connected
in interface org.apache.http.nio.NHttpServerEventHandler
public void requestReceived(org.apache.http.nio.NHttpServerConnection conn)
requestReceived
in interface org.apache.http.nio.NHttpServerEventHandler
public void inputReady(org.apache.http.nio.NHttpServerConnection conn, org.apache.http.nio.ContentDecoder decoder)
inputReady
in interface org.apache.http.nio.NHttpServerEventHandler
public void responseReady(org.apache.http.nio.NHttpServerConnection conn)
responseReady
in interface org.apache.http.nio.NHttpServerEventHandler
public void outputReady(org.apache.http.nio.NHttpServerConnection conn, org.apache.http.nio.ContentEncoder encoder)
outputReady
in interface org.apache.http.nio.NHttpServerEventHandler
public void logIOException(org.apache.http.nio.NHttpServerConnection conn, IOException e)
public void timeout(org.apache.http.nio.NHttpServerConnection conn)
timeout
in interface org.apache.http.nio.NHttpServerEventHandler
public void closed(org.apache.http.nio.NHttpServerConnection conn)
closed
in interface org.apache.http.nio.NHttpServerEventHandler
public void endOfInput(org.apache.http.nio.NHttpServerConnection conn) throws IOException
endOfInput
in interface org.apache.http.nio.NHttpServerEventHandler
IOException
public void exception(org.apache.http.nio.NHttpServerConnection conn, Exception ex)
exception
in interface org.apache.http.nio.NHttpServerEventHandler
public void informReaderError(org.apache.http.nio.NHttpServerConnection conn)
public void informWriterError(org.apache.http.nio.NHttpServerConnection conn)
public 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 stop()
public OutputStream getOutputStream(String method, SourceRequest request)
method
- Http Methodrequest
- Source Requestpublic SourceRequest getSourceRequest(org.apache.http.nio.NHttpServerConnection conn) throws IOException, org.apache.http.HttpException
conn
- the connection being processedIOException
org.apache.http.HttpException
Copyright © 2005–2020 Apache Software Foundation. All rights reserved.