Class HttpConnectionOverFCGI
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Connection
,IConnection
,Connection
,Attachable
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.io.Connection
Connection.Listener, Connection.UpgradeFrom, Connection.UpgradeTo
-
Constructor Summary
ConstructorDescriptionHttpConnectionOverFCGI
(EndPoint endPoint, HttpDestination destination, Promise<Connection> promise) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected HttpChannelOverFCGI
acquireHttpChannel
(int id, Request request) void
close()
Performs a logical close of this connection.protected void
protected boolean
closeByHTTP
(HttpFields fields) protected Flusher
boolean
isClosed()
protected HttpChannelOverFCGI
newHttpChannel
(Request request) void
Callback method invoked when the endpoint is ready to be read.boolean
Callback method invoked upon an idle timeout event.void
onOpen()
Callback method invoked when this connection is opened.protected void
release
(HttpChannelOverFCGI channel) void
send
(Request request, Response.CompleteListener listener) Sends a request with an associated response listener.send
(HttpExchange exchange) void
setAttachment
(Object obj) Attaches the given object to this stream for later retrieval.Methods inherited from class org.eclipse.jetty.io.AbstractConnection
addEventListener, failedCallback, fillInterested, getBytesIn, getBytesOut, getCreatedTimeStamp, getEndPoint, getExecutor, getInputBufferSize, getMessagesIn, getMessagesOut, isFillInterested, onClose, onFillInterestedFailed, onReadTimeout, removeEventListener, setInputBufferSize, toString, tryFillInterested
-
Constructor Details
-
HttpConnectionOverFCGI
public HttpConnectionOverFCGI(EndPoint endPoint, HttpDestination destination, Promise<Connection> promise)
-
-
Method Details
-
getHttpDestination
-
getLocalSocketAddress
- Specified by:
getLocalSocketAddress
in interfaceConnection
- Returns:
- the local socket address associated with the connection
-
getRemoteSocketAddress
- Specified by:
getRemoteSocketAddress
in interfaceConnection
- Returns:
- the remote socket address associated with the connection
-
getFlusher
-
send
Description copied from interface:Connection
Sends a request with an associated response listener.Request.send(Response.CompleteListener)
will eventually call this method to send the request. It is exposed to allow applications to send requests via unpooled connections.- Specified by:
send
in interfaceConnection
- Parameters:
request
- the request to sendlistener
- the response listener
-
send
- Specified by:
send
in interfaceIConnection
-
onOpen
public void onOpen()Description copied from interface:Connection
Callback method invoked when this connection is opened.
Creators of the connection implementation are responsible for calling this method.
- Specified by:
onOpen
in interfaceConnection
- Overrides:
onOpen
in classAbstractConnection
-
onFillable
public void onFillable()Description copied from class:AbstractConnection
Callback method invoked when the endpoint is ready to be read.
- Specified by:
onFillable
in classAbstractConnection
- See Also:
-
onIdleExpired
public boolean onIdleExpired()Description copied from interface:Connection
Callback method invoked upon an idle timeout event.
Implementations of this method may return true to indicate that the idle timeout handling should proceed normally, typically failing the EndPoint and causing it to be closed.
When false is returned, the handling of the idle timeout event is halted immediately and the EndPoint left in the state it was before the idle timeout event.
- Specified by:
onIdleExpired
in interfaceConnection
- Overrides:
onIdleExpired
in classAbstractConnection
- Returns:
- true to let the EndPoint handle the idle timeout, false to tell the EndPoint to halt the handling of the idle timeout.
-
release
-
close
public void close()Description copied from interface:Connection
Performs a logical close of this connection.
For simple connections, this may just mean to delegate the close to the associated
EndPoint
but, for example, SSL connections should write the SSL close message before closing the associatedEndPoint
.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceConnection
- Specified by:
close
in interfaceConnection
- Overrides:
close
in classAbstractConnection
-
close
-
isClosed
public boolean isClosed()- Specified by:
isClosed
in interfaceConnection
- Returns:
- whether this connection has been closed
- See Also:
-
setAttachment
Description copied from interface:Attachable
Attaches the given object to this stream for later retrieval.- Specified by:
setAttachment
in interfaceAttachable
- Parameters:
obj
- the object to attach to this instance
-
getAttachment
- Specified by:
getAttachment
in interfaceAttachable
- Returns:
- the object attached to this instance
- See Also:
-
closeByHTTP
-
abort
-
acquireHttpChannel
-
newHttpChannel
-
toConnectionString
- Overrides:
toConnectionString
in classAbstractConnection
-