## org.mortbay.cometd.client
Class BayeuxClient.Exchange

    java.lang.Object
      org.mortbay.jetty.client.HttpExchange
          org.mortbay.jetty.client.CachedExchange
              org.mortbay.jetty.client.ContentExchange
                  org.mortbay.cometd.client.BayeuxClient.Exchange

Direct Known Subclasses:
  BayeuxClient.Connect, BayeuxClient.Handshake, BayeuxClient.Publish

Enclosing class:
  BayeuxClient

    protected class BayeuxClient.Exchange

extends ContentExchange

The base class for all bayeux exchanges.

Nested Class Summary

Nested classes/interfaces inherited from class org.mortbay.jetty.client.HttpExchange
`HttpExchange.CachedExchange, HttpExchange.ContentExchange`

Field Summary

Fields inherited from class org.mortbay.jetty.client.ContentExchange
`_contentLength, _encoding, _fileForUpload, _responseContent, _responseStatus`

Fields inherited from class org.mortbay.jetty.client.CachedExchange
`_responseFields`

Fields inherited from class org.mortbay.jetty.client.HttpExchange
`STATUS_COMPLETED, STATUS_EXCEPTED, STATUS_EXPIRED, STATUS_PARSING_CONTENT, STATUS_PARSING_HEADERS, STATUS_SENDING_REQUEST, STATUS_START, STATUS_WAITING_FOR_COMMIT, STATUS_WAITING_FOR_CONNECTION, STATUS_WAITING_FOR_RESPONSE`

Method Summary
`int` `getBackoff()`
`void` `incBackoff()`
`protected void` `onResponseComplete()` Called when the entire response has been received
`protected void` `onResponseHeader(Buffer name, Buffer value)` Called for each response header received
`protected void` `onResponseStatus(Buffer version, int status, Buffer reason)` Called when a response status line has been received.
`protected void` `recycle()`
`protected void` `resend(boolean backoff)`
`protected void` `setJson(java.lang.String json)`
`protected void` `setMessage(java.lang.String message)`

Methods inherited from class org.mortbay.jetty.client.ContentExchange
`getFileForUpload, getResponseBytes, getResponseContent, getResponseStatus, onResponseContent, onRetry, setFileForUpload, writeResponseBytesTo`

Methods inherited from class org.mortbay.jetty.client.CachedExchange
`getResponseFields`

Methods inherited from class org.mortbay.jetty.client.HttpExchange

`addRequestHeader, addRequestHeader, cancel, configureListeners, getAddress, getEventListener, getMethod, getRequestContent, getRequestContentChunk, getRequestContentSource, getRequestFields, getRetryStatus, getScheme, getStatus, getTimeout, getURI, getVersion, isDone, onConnectionFailed, onException, onExpire, onRequestCommitted, onRequestComplete, onResponseHeaderComplete, reset, setAddress, setConfigureListeners, setEventListener, setMethod, setRequestContent, setRequestContentSource, setRequestContentType, setRequestHeader, setRequestHeader, setRetryStatus, setScheme, setTimeout, setURI, setURL, setVersion, setVersion, toString, waitForDone, waitForStatus`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Method Detail

### getBackoff

    public int getBackoff()

### incBackoff

    public void incBackoff()

### setMessage

    protected void setMessage(java.lang.String message)

### setJson

    protected void setJson(java.lang.String json)

### onResponseStatus

    protected void onResponseStatus(Buffer version,
                                    int status,
                                    Buffer reason)
                             throws java.io.IOException

  Description copied from class: `HttpExchange`
  Called when a response status line has been received.

  Overrides:
    `onResponseStatus` in class `ContentExchange`
  Parameters:
    `version` - HTTP version
    `status` - HTTP status code
    `reason` - HTTP status code reason string
  Throws:
    `java.io.IOException`

### onResponseHeader

    protected void onResponseHeader(Buffer name,
                                    Buffer value)
                             throws java.io.IOException

  Description copied from class: `HttpExchange`
  Called for each response header received

  Overrides:
    `onResponseHeader` in class `ContentExchange`
  Parameters:
    `name` - header name
    `value` - header value
  Throws:
    `java.io.IOException`

### onResponseComplete

    protected void onResponseComplete()
                               throws java.io.IOException

  Description copied from class: `HttpExchange`
  Called when the entire response has been received

  Overrides:
    `onResponseComplete` in class `HttpExchange`
  Throws:
    `java.io.IOException`

### resend

    protected void resend(boolean backoff)

### recycle

    protected void recycle()

Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.