org.wicketstuff.push.timer
Class TimerChannelService

java.lang.Object
  extended by org.wicketstuff.push.timer.TimerChannelService
All Implemented Interfaces:
java.io.Serializable, IChannelService

public class TimerChannelService
extends java.lang.Object
implements IChannelService, java.io.Serializable

See Also:
Serialized Form

Constructor Summary
TimerChannelService(org.apache.wicket.util.time.Duration duration)
           
 
Method Summary
 void addChannelListener(org.apache.wicket.Component component, java.lang.String listenerChannel, IChannelListener listener)
          Adds a behavior to the given component so that it will be notified of ChannelEvents.
 void publish(ChannelEvent event)
          Publishes a channel event which will be sent to the channel listeners.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimerChannelService

public TimerChannelService(org.apache.wicket.util.time.Duration duration)
Method Detail

addChannelListener

public void addChannelListener(org.apache.wicket.Component component,
                               java.lang.String listenerChannel,
                               IChannelListener listener)
Description copied from interface: IChannelService
Adds a behavior to the given component so that it will be notified of ChannelEvents.

Usually the component if a Page, even if it's not mandatory. Indeed the components reacting to the event are defined in the IChannelListener, by calling IChannelTarget methods. Hence any component on the page can serve as the host of the behavior, as soon as it is visible.

Specified by:
addChannelListener in interface IChannelService
Parameters:
component - the component to which the behavior should be added
listenerChannel - the channel for which the listener should be notified
listener - the IChannelListener which should be notified of ChannelEvents

publish

public void publish(ChannelEvent event)
Description copied from interface: IChannelService
Publishes a channel event which will be sent to the channel listeners.

Specified by:
publish in interface IChannelService
Parameters:
event - the event to publish to the listeners


Copyright © 2010. All Rights Reserved.