Top Inners Fields Constructors Methods
org.eclipse.jetty.client.transport.internal

public Class HttpSenderOverHTTP

extends HttpSender
Class Inheritance
Imports
java.nio.ByteBuffer, org.eclipse.jetty.client.HttpClient, .HttpRequestException, org.eclipse.jetty.client.transport.HttpExchange, .HttpRequest, .HttpSender, org.eclipse.jetty.http.HttpGenerator, .HttpURI, .MetaData, org.eclipse.jetty.io.ByteBufferPool, .Content, .EndPoint, .RetainableByteBuffer, org.eclipse.jetty.util.BufferUtil, .Callback, .IteratingCallback, org.slf4j.Logger, .LoggerFactory

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
private class

Field Summary

Modifier and TypeField and Description
private Callback
private ByteBuffer
private final IteratingCallback
private HttpExchange
private final HttpGenerator
private final IteratingCallback
private boolean
private static final Logger
private MetaData.Request
private boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
public HttpChannelOverHTTP
protected boolean
protected void
protected void
sendContent(HttpExchange
the exchange
exchange
,
ByteBuffer
the content to send
contentBuffer
,
boolean
whether the content is the last content to send
lastContent
,
Callback
the callback to notify
callback
)

Implements abstract org.eclipse.jetty.client.transport.HttpSender.sendContent.

Implementations should send the given HTTP content over the wire.

protected void
sendHeaders(HttpExchange
the exchange
exchange
,
ByteBuffer
the content to send
contentBuffer
,
boolean
whether the content is the last content to send
lastContent
,
Callback
the callback to notify
callback
)

Implements abstract org.eclipse.jetty.client.transport.HttpSender.sendHeaders.

Implementations should send the HTTP headers over the wire, possibly with some content, in a single write, and notify the given callback of the result of this operation.

private void
public String
toString()

Overrides org.eclipse.jetty.client.transport.HttpSender.toString.

Returns a string representation of the object.
Inherited from org.eclipse.jetty.client.transport.HttpSender:
abortbeginToHeadersexpects100ContinuegetHttpExchangeheadersToCommitisFailedproceedqueuedToBeginrelativizesendsomeToContentsomeToSuccess

Field Detail

callbackback to summary
private Callback callback
contentByteBufferback to summary
private ByteBuffer contentByteBuffer
contentCallbackback to summary
private final IteratingCallback contentCallback
exchangeback to summary
private HttpExchange exchange
generatorback to summary
private final HttpGenerator generator
headersCallbackback to summary
private final IteratingCallback headersCallback
lastContentback to summary
private boolean lastContent
LOGback to summary
private static final Logger LOG

Hides org.eclipse.jetty.client.transport.HttpSender.LOG.

metaDataback to summary
private MetaData.Request metaData
shutdownback to summary
private boolean shutdown

Constructor Detail

HttpSenderOverHTTPback to summary
public HttpSenderOverHTTP(HttpChannelOverHTTP channel)

Method Detail

disposeback to summary
protected void dispose()

Overrides org.eclipse.jetty.client.transport.HttpSender.dispose.

Annotations
@Override
getHttpChannelback to summary
public HttpChannelOverHTTP getHttpChannel()

Overrides org.eclipse.jetty.client.transport.HttpSender.getHttpChannel.

Annotations
@Override
isShutdownback to summary
protected boolean isShutdown()
resetback to summary
protected void reset()

Overrides org.eclipse.jetty.client.transport.HttpSender.reset.

Annotations
@Override
sendContentback to summary
protected void sendContent(HttpExchange exchange, ByteBuffer contentBuffer, boolean lastContent, Callback callback)

Implements abstract org.eclipse.jetty.client.transport.HttpSender.sendContent.

Doc from org.eclipse.jetty.client.transport.HttpSender.sendContent.

Implementations should send the given HTTP content over the wire.

Parameters
exchange:HttpExchange

the exchange

contentBuffer:ByteBuffer

the content to send

lastContent:boolean

whether the content is the last content to send

callback:Callback

the callback to notify

Annotations
@Override
sendHeadersback to summary
protected void sendHeaders(HttpExchange exchange, ByteBuffer contentBuffer, boolean lastContent, Callback callback)

Implements abstract org.eclipse.jetty.client.transport.HttpSender.sendHeaders.

Doc from org.eclipse.jetty.client.transport.HttpSender.sendHeaders.

Implementations should send the HTTP headers over the wire, possibly with some content, in a single write, and notify the given callback of the result of this operation.

If there is more content to send, then sendContent(HttpExchange, ByteBuffer, boolean, Callback) will be invoked.

Parameters
exchange:HttpExchange

the exchange

contentBuffer:ByteBuffer

the content to send

lastContent:boolean

whether the content is the last content to send

callback:Callback

the callback to notify

Annotations
@Override
shutdownOutputback to summary
private void shutdownOutput()
toStringback to summary
public String toString()

Overrides org.eclipse.jetty.client.transport.HttpSender.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
org.eclipse.jetty.client.transport.internal back to summary

private Class HttpSenderOverHTTP.ContentCallback

extends IteratingCallback
Class Inheritance

Field Summary

Modifier and TypeField and Description
private RetainableByteBuffer

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
onCompleteFailure(Throwable
the throwable to indicate cause of failure
cause
)

Overrides org.eclipse.jetty.util.IteratingCallback.onCompleteFailure.

Invoked when the overall task has completed with a failure.
protected IteratingCallback.Action
process()

Implements abstract org.eclipse.jetty.util.IteratingCallback.process.

Method called by iterate() to process the asynchronous sub-task.
private void
Inherited from org.eclipse.jetty.util.IteratingCallback:
abortclosefailedisAbortedisClosedisFailedisSucceedediterateonCompleteSuccessresetsucceededtoString

Field Detail

chunkBufferback to summary
private RetainableByteBuffer chunkBuffer

Constructor Detail

ContentCallbackback to summary
public ContentCallback()

Method Detail

onCompleteFailureback to summary
protected void onCompleteFailure(Throwable cause)

Overrides org.eclipse.jetty.util.IteratingCallback.onCompleteFailure.

Doc from org.eclipse.jetty.util.IteratingCallback.onCompleteFailure.

Invoked when the overall task has completed with a failure.

Parameters
cause:Throwable

the throwable to indicate cause of failure

Annotations
@Override
processback to summary
protected IteratingCallback.Action process() throws Exception

Implements abstract org.eclipse.jetty.util.IteratingCallback.process.

Doc from org.eclipse.jetty.util.IteratingCallback.process.

Method called by iterate() to process the asynchronous sub-task.

Implementations must initiate the asynchronous execution of the sub-task (if any) and return an appropriate action:

  • Action#IDLE when no sub tasks are available for execution but the overall job is not completed yet
  • Action#SCHEDULED when the sub task asynchronous execution has been started
  • Action#SUCCEEDED when the overall job is completed
Returns:IteratingCallback.Action

the appropriate Action

Annotations
@Override
releaseback to summary
private void release()
org.eclipse.jetty.client.transport.internal back to summary

private Class HttpSenderOverHTTP.HeadersCallback

extends IteratingCallback
Class Inheritance

Field Summary

Modifier and TypeField and Description
private RetainableByteBuffer
private boolean
private RetainableByteBuffer

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
failed(Throwable
the reason for the operation failure
x
)

Overrides org.eclipse.jetty.util.IteratingCallback.failed.

Overrides default org.eclipse.jetty.util.Callback.failed.

Method to invoke when the asynchronous sub-task fails, or to fail the overall asynchronous task and therefore terminate the iteration.
protected void
onCompleteFailure(Throwable
the throwable to indicate cause of failure
cause
)

Overrides org.eclipse.jetty.util.IteratingCallback.onCompleteFailure.

Invoked when the overall task has completed with a failure.
protected void
onCompleteSuccess()

Overrides org.eclipse.jetty.util.IteratingCallback.onCompleteSuccess.

Invoked when the overall task has completed successfully.
protected IteratingCallback.Action
process()

Implements abstract org.eclipse.jetty.util.IteratingCallback.process.

Method called by iterate() to process the asynchronous sub-task.
private void
public void
succeeded()

Overrides org.eclipse.jetty.util.IteratingCallback.succeeded.

Overrides default org.eclipse.jetty.util.Callback.succeeded.

Method to invoke when the asynchronous sub-task succeeds.
Inherited from org.eclipse.jetty.util.IteratingCallback:
abortcloseisAbortedisClosedisFailedisSucceedediterateresettoString

Field Detail

chunkBufferback to summary
private RetainableByteBuffer chunkBuffer
generatedback to summary
private boolean generated
headerBufferback to summary
private RetainableByteBuffer headerBuffer

Constructor Detail

HeadersCallbackback to summary
private HeadersCallback()

Method Detail

failedback to summary
public void failed(Throwable x)

Overrides org.eclipse.jetty.util.IteratingCallback.failed.

Overrides default org.eclipse.jetty.util.Callback.failed.

Doc from org.eclipse.jetty.util.IteratingCallback.failed.

Method to invoke when the asynchronous sub-task fails, or to fail the overall asynchronous task and therefore terminate the iteration.

Subclasses that override this method must always remember to call super.failed(Throwable).

Eventually, onCompleteFailure(Throwable) is called, either by the caller thread or by the processing thread.

Parameters
x:Throwable

Doc from org.eclipse.jetty.util.Callback.failed.

the reason for the operation failure

Annotations
@Override
onCompleteFailureback to summary
protected void onCompleteFailure(Throwable cause)

Overrides org.eclipse.jetty.util.IteratingCallback.onCompleteFailure.

Doc from org.eclipse.jetty.util.IteratingCallback.onCompleteFailure.

Invoked when the overall task has completed with a failure.

Parameters
cause:Throwable

the throwable to indicate cause of failure

Annotations
@Override
onCompleteSuccessback to summary
protected void onCompleteSuccess()

Overrides org.eclipse.jetty.util.IteratingCallback.onCompleteSuccess.

Doc from org.eclipse.jetty.util.IteratingCallback.onCompleteSuccess.

Invoked when the overall task has completed successfully.

Annotations
@Override
processback to summary
protected IteratingCallback.Action process() throws Exception

Implements abstract org.eclipse.jetty.util.IteratingCallback.process.

Doc from org.eclipse.jetty.util.IteratingCallback.process.

Method called by iterate() to process the asynchronous sub-task.

Implementations must initiate the asynchronous execution of the sub-task (if any) and return an appropriate action:

  • Action#IDLE when no sub tasks are available for execution but the overall job is not completed yet
  • Action#SCHEDULED when the sub task asynchronous execution has been started
  • Action#SUCCEEDED when the overall job is completed
Returns:IteratingCallback.Action

the appropriate Action

Annotations
@Override
releaseback to summary
private void release()
succeededback to summary
public void succeeded()

Overrides org.eclipse.jetty.util.IteratingCallback.succeeded.

Overrides default org.eclipse.jetty.util.Callback.succeeded.

Doc from org.eclipse.jetty.util.IteratingCallback.succeeded.

Method to invoke when the asynchronous sub-task succeeds.

Subclasses that override this method must always remember to call super.succeeded().

Annotations
@Override