public class HttpTransportOverFCGI extends java.lang.Object implements HttpTransport
| Constructor and Description |
|---|
HttpTransportOverFCGI(ByteBufferPool byteBufferPool,
Flusher flusher,
int request,
boolean sendStatus200) |
| Modifier and Type | Method and Description |
|---|---|
void |
abort(java.lang.Throwable failure)
Aborts this transport.
|
protected Generator.Result |
generateResponseContent(java.nio.ByteBuffer buffer,
boolean lastContent,
Callback callback) |
protected Generator.Result |
generateResponseHeaders(MetaData.Response info,
Callback callback) |
boolean |
isOptimizedForDirectBuffers()
Is the underlying transport optimized for DirectBuffer usage
|
boolean |
isPushSupported() |
void |
onCompleted()
Called to indicated the end of the current request/response cycle (which may be
some time after the last content is sent).
|
void |
push(MetaData.Request request) |
void |
send(MetaData.Response info,
boolean head,
java.nio.ByteBuffer content,
boolean lastContent,
Callback callback)
Asynchronous call to send a response (or part) over the transport
|
public HttpTransportOverFCGI(ByteBufferPool byteBufferPool, Flusher flusher, int request, boolean sendStatus200)
public boolean isOptimizedForDirectBuffers()
HttpTransportisOptimizedForDirectBuffers in interface HttpTransportpublic void send(MetaData.Response info, boolean head, java.nio.ByteBuffer content, boolean lastContent, Callback callback)
HttpTransportsend in interface HttpTransportinfo - The header info to send, or null if just sending more data.
The first call to send for a response must have a non null info.head - True if the response if for a HEAD request (and the data should not be sent).content - A buffer of content to be sent.lastContent - True if the content is the last content for the current response.callback - The Callback instance that success or failure of the send is notified onpublic boolean isPushSupported()
isPushSupported in interface HttpTransportpublic void push(MetaData.Request request)
push in interface HttpTransportrequest - A request to use as the basis for generating a pushed response.protected Generator.Result generateResponseHeaders(MetaData.Response info, Callback callback)
protected Generator.Result generateResponseContent(java.nio.ByteBuffer buffer, boolean lastContent, Callback callback)
public void abort(java.lang.Throwable failure)
HttpTransportThis method should terminate the transport in a way that can indicate an abnormal response to the client, for example by abruptly close the connection.
This method is called when an error response needs to be sent,
but the response is already committed, or when a write failure
is detected. If abort is called, HttpTransport.onCompleted() is not
called
abort in interface HttpTransportfailure - the failure that caused the abort.public void onCompleted()
HttpTransportonCompleted in interface HttpTransportCopyright © 1995–2023 Webtide. All rights reserved.