Package org.eclipse.jetty.fcgi.server
Class HttpChannelOverFCGI
java.lang.Object
org.eclipse.jetty.server.HttpChannel
org.eclipse.jetty.fcgi.server.HttpChannelOverFCGI
- All Implemented Interfaces:
Runnable
,HttpOutput.Interceptor
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.server.HttpChannel
HttpChannel.Listener, HttpChannel.TransientListeners
-
Field Summary
Fields inherited from class org.eclipse.jetty.server.HttpChannel
NOOP_LISTENER
-
Constructor Summary
ConstructorDescriptionHttpChannelOverFCGI
(ServerFCGIConnection connection, Connector connector, HttpConfiguration configuration, EndPoint endPoint, HttpTransport transport) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
dispatch()
protected boolean
eof()
Mark the channel's input as EOF.boolean
failAllContent
(Throwable failure) Fail all content that is currently stored within the channel.boolean
Fail the channel's input.protected void
boolean
Notify the channel that content is needed.void
boolean
onContent
(HttpInput.Content content) boolean
onIdleTimeout
(Throwable timeout) void
Produce aHttpInput.Content
object with data currently stored within the channel.void
recycle()
Methods inherited from class org.eclipse.jetty.server.HttpChannel
abort, addListener, addRequestLog, checkAndPrepareUpgrade, commit, continue100, ensureConsumeAllOrNotPersistent, execute, formatAddrOrHost, getByteBufferPool, getBytesWritten, getCommittedMetaData, getConnection, getConnector, getEndPoint, getHttpConfiguration, getHttpTransport, getIdleTimeout, getLocalAddress, getLocalName, getLocalPort, getNextInterceptor, getRemoteAddress, getRequest, getRequestLog, getRequests, getResponse, getScheduler, getServer, getServerAuthority, getState, getTransientListeners, getTunnellingEndPoint, handle, handleException, isCommitted, isExpecting100Continue, isExpecting102Processing, isPersistent, isRequestCompleted, isResponseCompleted, isSendError, isTunnellingSupported, isUseInputDirectByteBuffers, isUseOutputDirectByteBuffers, newHttpOutput, onBadMessage, onContentComplete, onRequest, onRequestComplete, onTrailers, removeListener, resetBuffer, run, sendErrorOrAbort, sendResponse, sendResponse, sendResponseAndComplete, setIdleTimeout, setRequestLog, toString, unwrap, write
-
Constructor Details
-
HttpChannelOverFCGI
public HttpChannelOverFCGI(ServerFCGIConnection connection, Connector connector, HttpConfiguration configuration, EndPoint endPoint, HttpTransport transport)
-
-
Method Details
-
onContent
- Overrides:
onContent
in classHttpChannel
-
needContent
public boolean needContent()Description copied from class:HttpChannel
Notify the channel that content is needed. If some content is immediately available, true is returned andHttpChannel.produceContent()
has to be called and will return a non-null object. If no content is immediately available, an attempt to produce content must be made; if new content has been produced, true is returned; otherwiseHttpInput.onContentProducible()
is called once some content arrives andHttpChannel.produceContent()
can be called without returningnull
. If a failure happens, thenHttpInput.onContentProducible()
will be called and an error content will return the error on the next call toHttpChannel.produceContent()
.- Specified by:
needContent
in classHttpChannel
- Returns:
- true if content is immediately available.
-
produceContent
Description copied from class:HttpChannel
Produce aHttpInput.Content
object with data currently stored within the channel. The produced content can be special (meaning callingHttpInput.Content.isSpecial()
returns true) if the channel reached a special state, like EOF or an error. Once a special content has been returned, all subsequent calls to this method will always return a special content of the same kind andHttpChannel.needContent()
will always return true. The returned content is "raw", i.e.: not decoded.- Specified by:
produceContent
in classHttpChannel
- Returns:
- a
HttpInput.Content
object if one is immediately available without blocking, null otherwise.
-
failAllContent
Description copied from class:HttpChannel
Fail all content that is currently stored within the channel.- Specified by:
failAllContent
in classHttpChannel
- Parameters:
failure
- the failure to fail the content with.- Returns:
- true if EOF was reached while failing all content, false otherwise.
-
failed
Description copied from class:HttpChannel
Fail the channel's input.- Specified by:
failed
in classHttpChannel
- Parameters:
x
- the failure.- Returns:
- true if the channel needs to be rescheduled.
-
eof
protected boolean eof()Description copied from class:HttpChannel
Mark the channel's input as EOF.- Specified by:
eof
in classHttpChannel
- Returns:
- true if the channel needs to be rescheduled.
-
header
-
onRequest
public void onRequest() -
dispatch
protected void dispatch() -
onIdleTimeout
-
recycle
public void recycle()- Overrides:
recycle
in classHttpChannel
-
onCompleted
public void onCompleted()- Overrides:
onCompleted
in classHttpChannel
-