Class HttpTransportOverFCGI
java.lang.Object
org.eclipse.jetty.fcgi.server.HttpTransportOverFCGI
- All Implemented Interfaces:
HttpTransport
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHttpTransportOverFCGI(ByteBufferPool byteBufferPool, Flusher flusher, int request, boolean sendStatus200) -
Method Summary
Modifier and TypeMethodDescriptionvoidAborts this transport.private voidcommit(MetaData.Response info, boolean head, ByteBuffer content, boolean lastContent, Callback callback) protected Generator.ResultgenerateResponseContent(ByteBuffer buffer, boolean lastContent, Callback callback) protected Generator.ResultgenerateResponseHeaders(MetaData.Response info, Callback callback) booleanIs the underlying transport optimized for DirectBuffer usagebooleanvoidCalled to indicated the end of the current request/response cycle (which may be some time after the last content is sent).voidpush(MetaData.Request request) voidsend(MetaData.Response info, boolean head, ByteBuffer content, boolean lastContent, Callback callback) Asynchronous call to send a response (or part) over the transport
-
Field Details
-
LOG
-
generator
-
flusher
-
request
private final int request -
shutdown
private volatile boolean shutdown -
aborted
private volatile boolean aborted
-
-
Constructor Details
-
HttpTransportOverFCGI
public HttpTransportOverFCGI(ByteBufferPool byteBufferPool, Flusher flusher, int request, boolean sendStatus200)
-
-
Method Details
-
isOptimizedForDirectBuffers
public boolean isOptimizedForDirectBuffers()Description copied from interface:HttpTransportIs the underlying transport optimized for DirectBuffer usage- Specified by:
isOptimizedForDirectBuffersin interfaceHttpTransport- Returns:
- True if direct buffers can be used optimally.
-
send
public void send(MetaData.Response info, boolean head, ByteBuffer content, boolean lastContent, Callback callback) Description copied from interface:HttpTransportAsynchronous call to send a response (or part) over the transport- Specified by:
sendin interfaceHttpTransport- Parameters:
info- 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 on
-
isPushSupported
public boolean isPushSupported()- Specified by:
isPushSupportedin interfaceHttpTransport- Returns:
- true if responses can be pushed over this transport
-
push
- Specified by:
pushin interfaceHttpTransport- Parameters:
request- A request to use as the basis for generating a pushed response.
-
commit
private void commit(MetaData.Response info, boolean head, ByteBuffer content, boolean lastContent, Callback callback) -
generateResponseHeaders
-
generateResponseContent
protected Generator.Result generateResponseContent(ByteBuffer buffer, boolean lastContent, Callback callback) -
abort
Description copied from interface:HttpTransportAborts this transport.This 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- Specified by:
abortin interfaceHttpTransport- Parameters:
failure- the failure that caused the abort.
-
onCompleted
public void onCompleted()Description copied from interface:HttpTransportCalled to indicated the end of the current request/response cycle (which may be some time after the last content is sent).- Specified by:
onCompletedin interfaceHttpTransport
-