Package org.eclipse.jetty.client.http
Class HttpConnectionOverHTTP
java.lang.Object
org.eclipse.jetty.io.AbstractConnection
org.eclipse.jetty.client.http.HttpConnectionOverHTTP
- All Implemented Interfaces:
Closeable,AutoCloseable,Connection,Connection,Connection.UpgradeFrom,org.eclipse.jetty.util.Attachable,org.eclipse.jetty.util.thread.Sweeper.Sweepable
public class HttpConnectionOverHTTP
extends AbstractConnection
implements Connection, Connection.UpgradeFrom, org.eclipse.jetty.util.thread.Sweeper.Sweepable, org.eclipse.jetty.util.Attachable
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.io.Connection
Connection.Listener, Connection.UpgradeFrom, Connection.UpgradeTo -
Constructor Summary
ConstructorsConstructorDescriptionHttpConnectionOverHTTP(EndPoint endPoint, HttpDestination destination, org.eclipse.jetty.util.Promise<Connection> promise) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanprotected voidaddBytesIn(long bytesIn) protected voidaddBytesOut(long bytesOut) voidclose()protected voidlonglonglonglongbooleanisClosed()protected HttpChannelOverHTTPvoidbooleanprotected booleanonIdleTimeout(long idleTimeout) voidonOpen()voidrelease()voidremove()voidsend(Request request, Response.CompleteListener listener) Sends a request with an associated response listener.protected SendFailuresend(HttpExchange exchange) voidsetAttachment(Object obj) booleansweep()Methods inherited from class org.eclipse.jetty.io.AbstractConnection
addListener, failedCallback, fillInterested, getCreatedTimeStamp, getEndPoint, getExecutor, getInputBufferSize, isFillInterested, onClose, onFillInterestedFailed, onReadTimeout, removeListener, setInputBufferSize, toString, tryFillInterested, tryFillInterested
-
Constructor Details
-
HttpConnectionOverHTTP
public HttpConnectionOverHTTP(EndPoint endPoint, HttpDestination destination, org.eclipse.jetty.util.Promise<Connection> promise)
-
-
Method Details
-
newHttpChannel
-
getHttpChannel
-
getHttpDestination
-
getBytesIn
public long getBytesIn()- Specified by:
getBytesInin interfaceConnection- Overrides:
getBytesInin classAbstractConnection
-
addBytesIn
protected void addBytesIn(long bytesIn) -
getBytesOut
public long getBytesOut()- Specified by:
getBytesOutin interfaceConnection- Overrides:
getBytesOutin classAbstractConnection
-
addBytesOut
protected void addBytesOut(long bytesOut) -
getMessagesIn
public long getMessagesIn()- Specified by:
getMessagesInin interfaceConnection- Overrides:
getMessagesInin classAbstractConnection
-
getMessagesOut
public long getMessagesOut()- Specified by:
getMessagesOutin interfaceConnection- Overrides:
getMessagesOutin classAbstractConnection
-
send
Description copied from interface:ConnectionSends 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:
sendin interfaceConnection- Parameters:
request- the request to sendlistener- the response listener
-
send
-
onOpen
public void onOpen()- Specified by:
onOpenin interfaceConnection- Overrides:
onOpenin classAbstractConnection
-
isClosed
public boolean isClosed()- Specified by:
isClosedin interfaceConnection- Returns:
- whether this connection has been closed
- See Also:
-
setAttachment
- Specified by:
setAttachmentin interfaceorg.eclipse.jetty.util.Attachable
-
getAttachment
- Specified by:
getAttachmentin interfaceorg.eclipse.jetty.util.Attachable
-
onIdleExpired
public boolean onIdleExpired()- Specified by:
onIdleExpiredin interfaceConnection- Overrides:
onIdleExpiredin classAbstractConnection
-
onIdleTimeout
protected boolean onIdleTimeout(long idleTimeout) -
onFillable
public void onFillable()- Specified by:
onFillablein classAbstractConnection
-
onUpgradeFrom
- Specified by:
onUpgradeFromin interfaceConnection.UpgradeFrom
-
release
public void release() -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceConnection- Specified by:
closein interfaceConnection- Overrides:
closein classAbstractConnection
-
close
-
abort
-
sweep
public boolean sweep()- Specified by:
sweepin interfaceorg.eclipse.jetty.util.thread.Sweeper.Sweepable
-
remove
public void remove() -
toConnectionString
- Overrides:
toConnectionStringin classAbstractConnection
-