com.ibm.events.samples.consumer
Class SampleEventConsumer

java.lang.Object
  extended by com.ibm.events.samples.consumer.SampleEventConsumer

public class SampleEventConsumer
extends java.lang.Object

This class provides sample code for an event consumer.


Constructor Summary
SampleEventConsumer()
          Constructs the sample event consumer
 
Method Summary
 void displayUsage()
          Displays the command-line usage for this sample.
static void main(java.lang.String[] args)
          Main method that will take command line arguments and run the event consumer
 void run()
          Runs the sample event consumer
 void setEventGroup(java.lang.String eventGroup)
          Sets the event group used for event consumption
 void setEventSelector(java.lang.String eventSelector)
          Sets the event selector used for event consumption
 void setNumber(int number)
          Sets the number of events to query
 void setPrintEvents(boolean printEvents)
          Sets whether events should be printed or not
 void setProviderUrl(java.lang.String providerUrl)
          Sets the JNDI URL provider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SampleEventConsumer

public SampleEventConsumer()
Constructs the sample event consumer

Method Detail

setEventGroup

public void setEventGroup(java.lang.String eventGroup)
Sets the event group used for event consumption

Parameters:
eventGroup - The event group to use for event consumption

setEventSelector

public void setEventSelector(java.lang.String eventSelector)
Sets the event selector used for event consumption

Parameters:
eventSelector - The event selector to use for event consumption

setNumber

public void setNumber(int number)
Sets the number of events to query

Parameters:
number - The number of events to query

setPrintEvents

public void setPrintEvents(boolean printEvents)
Sets whether events should be printed or not

Parameters:
printEvents - Whether to print out events or not

setProviderUrl

public void setProviderUrl(java.lang.String providerUrl)
Sets the JNDI URL provider.

Parameters:
providerUrl - The JNDI URL provider

displayUsage

public void displayUsage()
Displays the command-line usage for this sample.


main

public static void main(java.lang.String[] args)
Main method that will take command line arguments and run the event consumer

Parameters:
args - Array arguements passed form the command line

run

public void run()
Runs the sample event consumer