## org.cometd.oort
Class OortComet

    java.lang.Object
      org.mortbay.component.AbstractLifeCycle
          org.mortbay.cometd.client.BayeuxClient
              org.cometd.oort.OortComet

All Implemented Interfaces:
  org.cometd.Client, LifeCycle

    public class OortComet

extends BayeuxClient

Oort Comet client.

A BayeuxClient that connects the local Oort comet server to a remote Oort comet server.

Nested Class Summary
`protected class` `OortComet.OortCometListener`

Nested classes/interfaces inherited from class org.mortbay.cometd.client.BayeuxClient
`BayeuxClient.Connect, BayeuxClient.Exchange, BayeuxClient.Handshake, BayeuxClient.Publish`

Nested classes/interfaces inherited from interface org.mortbay.component.LifeCycle
`LifeCycle.Listener`

Field Summary
`protected java.lang.String` `_cometSecret`
`protected java.lang.String` `_cometUrl`
`protected boolean` `_connected`
`protected boolean` `_handshook`
`protected Oort` `_oort`

Fields inherited from class org.mortbay.cometd.client.BayeuxClient
`_cometdAddress, _extensions, _httpClient, _jsonOut, _msgPool`

Fields inherited from class org.mortbay.component.AbstractLifeCycle
`_listeners`

Method Summary
`protected java.lang.String` `extendOut(java.lang.String message)` Called to extend outbound string messages.
`boolean` `isConnected()`
`boolean` `isHandshook()`
`protected void` `metaConnect(boolean success, org.cometd.Message message)` Called with the results of a /meta/connect message
`protected void` `metaHandshake(boolean success, boolean reestablish, org.cometd.Message message)` Called with the results of a /meta/handshake message
`protected void` `metaPublishFail(java.lang.Throwable e, org.cometd.Message[] messages)` Called with the results of a failed publish

Methods inherited from class org.mortbay.cometd.client.BayeuxClient

`addExtension, addListener, customize, deliver, deliver, disconnect, doStart, doStop, endBatch, extendIn, extendOut, getBackoffIncrement, getBackoffInterval, getBackoffMaxInterval, getBackoffMaxRetries, getCookie, getId, getListener, getMaxQueue, getQueue, hasMessages, isInitialized, isLocal, isPolling, publish, remove, removeExtension, removeListener, send, send, setBackoffIncrement, setBackOffInterval, setBackoffMaxInterval, setBackoffMaxRetries, setCookie, setInitialized, setListener, setMaxQueue, startBatch, subscribe, takeMessages, unsubscribe`

Methods inherited from class org.mortbay.component.AbstractLifeCycle
`addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop`

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

Field Detail

### _oort

    protected Oort _oort

### _cometUrl

    protected java.lang.String _cometUrl

### _cometSecret

    protected java.lang.String _cometSecret

### _connected

    protected boolean _connected

### _handshook

    protected boolean _handshook

Method Detail

### isConnected

    public boolean isConnected()

### isHandshook

    public boolean isHandshook()

### extendOut

    protected java.lang.String extendOut(java.lang.String message)

  Description copied from class: `BayeuxClient`
  Called to extend outbound string messages. Some messages are sent as preformatted JSON strings (eg handshake and connect messages). This extendOut method is a variation of the `BayeuxClient.extendOut(Message)` method to efficiently cater for these preformatted strings.

  This method calls the `Extension`s added by `BayeuxClient.addExtension(Extension)`

  Overrides:
    `extendOut` in class `BayeuxClient`
  Returns:
    the extended message

### metaConnect

    protected void metaConnect(boolean success,
                               org.cometd.Message message)

  Description copied from class: `BayeuxClient`
  Called with the results of a /meta/connect message

  Overrides:
    `metaConnect` in class `BayeuxClient`
  Parameters:
    `success` - connect was returned with this status

### metaHandshake

    protected void metaHandshake(boolean success,
                                 boolean reestablish,
                                 org.cometd.Message message)

  Description copied from class: `BayeuxClient`
  Called with the results of a /meta/handshake message

  Overrides:
    `metaHandshake` in class `BayeuxClient`
  Parameters:
    `success` - connect was returned with this status
    `reestablish` - the client was previously connected.

### metaPublishFail

    protected void metaPublishFail(java.lang.Throwable e,
                                   org.cometd.Message[] messages)

  Description copied from class: `BayeuxClient`
  Called with the results of a failed publish

  Overrides:
    `metaPublishFail` in class `BayeuxClient`

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