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.
Method Summary |
protected String |
extendOut(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(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, removeListener, send, send, setBackoffIncrement, setBackOffInterval, setBackoffMaxInterval, setBackoffMaxRetries, setCookie, setInitialized, setListener, setMaxQueue, startBatch, subscribe, takeMessages, unsubscribe |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_oort
protected Oort _oort
_cometUrl
protected String _cometUrl
_cometSecret
protected String _cometSecret
_connected
protected boolean _connected
_handshook
protected boolean _handshook
isConnected
public boolean isConnected()
isHandshook
public boolean isHandshook()
extendOut
protected String extendOut(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 statusreestablish
- the client was previously connected.
metaPublishFail
protected void metaPublishFail(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-2009 Mort Bay Consulting. All Rights Reserved.