com.ibm.websphere.samples.asynchbeans.wstrader.pricegen
Class PricePublisherAlarm

java.lang.Object
  extended by com.ibm.websphere.samples.asynchbeans.wstrader.pricegen.PricePublisherAlarm
All Implemented Interfaces:
com.ibm.websphere.asynchbeans.AlarmListener

public class PricePublisherAlarm
extends java.lang.Object
implements com.ibm.websphere.asynchbeans.AlarmListener

An asynchronous Alarm that fires at a given interval for a specific ticker symbol.


Constructor Summary
PricePublisherAlarm(RawTickerConfigLocal data, javax.jms.Topic topic)
          Create a PricePublisherAlarm.
 
Method Summary
 void fired(com.ibm.websphere.asynchbeans.Alarm alarm)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PricePublisherAlarm

public PricePublisherAlarm(RawTickerConfigLocal data,
                           javax.jms.Topic topic)
                    throws java.rmi.RemoteException,
                           javax.jms.JMSException
Create a PricePublisherAlarm. The alarm will fire, publishing ticker information to a JMS Topic at a sepcified interval. The topic connection is reestablished each time the alarm is fired instead of storing it when this alarm is constructed. This must be done because the topic connection would be associated with the container that created the alarm and not with the alarm itself. The information and instructions on the ticker symbol, price information and how the price changes is included in the data parameter.

Parameters:
data - the ticker configuration information that includes details on how to fire the ticker.
topic - the JMS Topic to post the ticker message to.
Throws:
java.rmi.RemoteException
javax.jms.JMSException
Method Detail

fired

public void fired(com.ibm.websphere.asynchbeans.Alarm alarm)
Specified by:
fired in interface com.ibm.websphere.asynchbeans.AlarmListener
See Also:
AlarmListener.fired(Alarm)