org.wicketstuff.push.cometd
Class CometdPushBehavior

java.lang.Object
  extended by org.apache.wicket.behavior.Behavior
      extended by org.apache.wicket.behavior.AbstractAjaxBehavior
          extended by org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
              extended by org.wicketstuff.push.cometd.CometdPushBehavior
All Implemented Interfaces:
Serializable, IBehaviorListener, IComponentAwareEventSink, IRequestListener, IComponentAwareHeaderContributor, IClusterable

public class CometdPushBehavior
extends AbstractDefaultAjaxBehavior

This behavior will be asked by client side when it will receive a cometd event associated with the kind of event There is currently no support for multiple cometd servlets. It is not possible to override which URL to use via the getCometdServletPath() overridable method. But two cometd instances cannot be used simultaneously.

Author:
Xavier Hanin, Rodolfo Hansen, Sebastian Thomschke
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
INDICATOR
 
Fields inherited from interface org.apache.wicket.behavior.IBehaviorListener
INTERFACE
 
Method Summary
 String getCometdChannelId()
          get the channel where this behavior will wait for event
protected  String getCometdServletPath()
          Returns the behaviour's cometd servlet path.
 void renderHead(Component c, org.apache.wicket.markup.head.IHeaderResponse response)
          
protected  void respond(AjaxRequestTarget target)
          
 
Methods inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
findIndicatorId, getAttributes, getCallbackFunction, getCallbackFunctionBody, getCallbackScript, getCallbackScript, getChannel, getFailureScript, getPreconditionScript, getSuccessScript, onBind, onRequest, postprocessConfiguration, renderAjaxAttributes, renderAjaxAttributes, updateAjaxAttributes
 
Methods inherited from class org.apache.wicket.behavior.AbstractAjaxBehavior
afterRender, bind, getCallbackUrl, getComponent, onComponentRendered, onComponentTag, onComponentTag
 
Methods inherited from class org.apache.wicket.behavior.Behavior
beforeRender, canCallListenerInterface, detach, getStatelessHint, isEnabled, isTemporary, onConfigure, onEvent, onException, unbind
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCometdChannelId

public String getCometdChannelId()
get the channel where this behavior will wait for event

Returns:
channelId channel where this behavior will wait for event

getCometdServletPath

protected String getCometdServletPath()
Returns the behaviour's cometd servlet path. Uses the DEFAULT_COMETD_PATH provided by guessCometdServletPath(). Override if you have an unusual setup.

Returns:
the behaviour's cometd servlet path.

renderHead

public void renderHead(Component c,
                       org.apache.wicket.markup.head.IHeaderResponse response)

Specified by:
renderHead in interface IComponentAwareHeaderContributor
Overrides:
renderHead in class AbstractDefaultAjaxBehavior

respond

protected void respond(AjaxRequestTarget target)

Specified by:
respond in class AbstractDefaultAjaxBehavior


Copyright © 2012. All Rights Reserved.