- java.lang.Object
-
- org.eclipse.jetty.io.AbstractConnection
-
- org.eclipse.jetty.client.http.HttpConnectionOverHTTP
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,Connection,IConnection,org.eclipse.jetty.io.Connection,org.eclipse.jetty.io.Connection.UpgradeFrom,org.eclipse.jetty.util.Attachable,org.eclipse.jetty.util.thread.Sweeper.Sweepable
public class HttpConnectionOverHTTP extends org.eclipse.jetty.io.AbstractConnection implements IConnection, org.eclipse.jetty.io.Connection.UpgradeFrom, org.eclipse.jetty.util.thread.Sweeper.Sweepable, org.eclipse.jetty.util.Attachable
-
-
Constructor Summary
Constructors Constructor Description HttpConnectionOverHTTP(org.eclipse.jetty.io.EndPoint endPoint, java.util.Map<java.lang.String,java.lang.Object> context)HttpConnectionOverHTTP(org.eclipse.jetty.io.EndPoint endPoint, HttpDestination destination, org.eclipse.jetty.util.Promise<Connection> promise)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanabort(java.lang.Throwable failure)protected voidaddBytesIn(long bytesIn)protected voidaddBytesOut(long bytesOut)voidclose()protected voidclose(java.lang.Throwable failure)java.lang.ObjectgetAttachment()longgetBytesIn()longgetBytesOut()HttpChannelOverHTTPgetHttpChannel()HttpDestinationgetHttpDestination()longgetMessagesIn()longgetMessagesOut()booleanisClosed()protected HttpChannelOverHTTPnewHttpChannel()voidonFillable()booleanonIdleExpired()protected booleanonIdleTimeout(long idleTimeout)voidonOpen()java.nio.ByteBufferonUpgradeFrom()voidrelease()voidremove()voidsend(Request request, Response.CompleteListener listener)Sends a request with an associated response listener.SendFailuresend(HttpExchange exchange)voidsetAttachment(java.lang.Object obj)booleansweep()java.lang.StringtoConnectionString()-
Methods inherited from class org.eclipse.jetty.io.AbstractConnection
addEventListener, failedCallback, fillInterested, getCreatedTimeStamp, getEndPoint, getExecutor, getInputBufferSize, isFillInterested, onClose, onFillInterestedFailed, onReadTimeout, removeEventListener, setInputBufferSize, toString, tryFillInterested, tryFillInterested
-
-
-
-
Constructor Detail
-
HttpConnectionOverHTTP
public HttpConnectionOverHTTP(org.eclipse.jetty.io.EndPoint endPoint, java.util.Map<java.lang.String,java.lang.Object> context)
-
HttpConnectionOverHTTP
public HttpConnectionOverHTTP(org.eclipse.jetty.io.EndPoint endPoint, HttpDestination destination, org.eclipse.jetty.util.Promise<Connection> promise)
-
-
Method Detail
-
newHttpChannel
protected HttpChannelOverHTTP newHttpChannel()
-
getHttpChannel
public HttpChannelOverHTTP getHttpChannel()
-
getHttpDestination
public HttpDestination getHttpDestination()
-
getBytesIn
public long getBytesIn()
- Specified by:
getBytesInin interfaceorg.eclipse.jetty.io.Connection- Overrides:
getBytesInin classorg.eclipse.jetty.io.AbstractConnection
-
addBytesIn
protected void addBytesIn(long bytesIn)
-
getBytesOut
public long getBytesOut()
- Specified by:
getBytesOutin interfaceorg.eclipse.jetty.io.Connection- Overrides:
getBytesOutin classorg.eclipse.jetty.io.AbstractConnection
-
addBytesOut
protected void addBytesOut(long bytesOut)
-
getMessagesIn
public long getMessagesIn()
- Specified by:
getMessagesInin interfaceorg.eclipse.jetty.io.Connection- Overrides:
getMessagesInin classorg.eclipse.jetty.io.AbstractConnection
-
getMessagesOut
public long getMessagesOut()
- Specified by:
getMessagesOutin interfaceorg.eclipse.jetty.io.Connection- Overrides:
getMessagesOutin classorg.eclipse.jetty.io.AbstractConnection
-
send
public void send(Request request, Response.CompleteListener listener)
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
public SendFailure send(HttpExchange exchange)
- Specified by:
sendin interfaceIConnection
-
onOpen
public void onOpen()
- Specified by:
onOpenin interfaceorg.eclipse.jetty.io.Connection- Overrides:
onOpenin classorg.eclipse.jetty.io.AbstractConnection
-
isClosed
public boolean isClosed()
- Specified by:
isClosedin interfaceConnection- Returns:
- whether this connection has been closed
- See Also:
Connection.close()
-
setAttachment
public void setAttachment(java.lang.Object obj)
- Specified by:
setAttachmentin interfaceorg.eclipse.jetty.util.Attachable
-
getAttachment
public java.lang.Object getAttachment()
- Specified by:
getAttachmentin interfaceorg.eclipse.jetty.util.Attachable
-
onIdleExpired
public boolean onIdleExpired()
- Specified by:
onIdleExpiredin interfaceorg.eclipse.jetty.io.Connection- Overrides:
onIdleExpiredin classorg.eclipse.jetty.io.AbstractConnection
-
onIdleTimeout
protected boolean onIdleTimeout(long idleTimeout)
-
onFillable
public void onFillable()
- Specified by:
onFillablein classorg.eclipse.jetty.io.AbstractConnection
-
onUpgradeFrom
public java.nio.ByteBuffer onUpgradeFrom()
- Specified by:
onUpgradeFromin interfaceorg.eclipse.jetty.io.Connection.UpgradeFrom
-
release
public void release()
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfaceConnection- Specified by:
closein interfaceorg.eclipse.jetty.io.Connection- Overrides:
closein classorg.eclipse.jetty.io.AbstractConnection
-
close
protected void close(java.lang.Throwable failure)
-
abort
protected boolean abort(java.lang.Throwable failure)
-
sweep
public boolean sweep()
- Specified by:
sweepin interfaceorg.eclipse.jetty.util.thread.Sweeper.Sweepable
-
remove
public void remove()
-
toConnectionString
public java.lang.String toConnectionString()
- Overrides:
toConnectionStringin classorg.eclipse.jetty.io.AbstractConnection
-
-