com.googlecode.fascinator.common.messaging
Interface GenericListener

All Superinterfaces:
javax.jms.MessageListener, Runnable

public interface GenericListener
extends javax.jms.MessageListener, Runnable

A Basic message listener for use in IndexerServlet. Real message listeners are expected to extend this class.

Author:
Greg Pendlebury

Method Summary
 String getId()
          Return the ID string for this listener
 void init(JsonSimpleConfig config)
          Initialization method
 void setPriority(int newPriority)
          Sets the priority level for the thread.
 void start()
          Start the queue
 void stop()
          Stop the Queue Consumer
 
Methods inherited from interface javax.jms.MessageListener
onMessage
 
Methods inherited from interface java.lang.Runnable
run
 

Method Detail

init

void init(JsonSimpleConfig config)
          throws Exception
Initialization method

Parameters:
config - Configuration to use
Throws:
IOException - if the configuration file not found
Exception

getId

String getId()
Return the ID string for this listener


start

void start()
           throws Exception
Start the queue

Throws:
javax.jms.JMSException - if an error occurred starting the JMS connections
Exception

stop

void stop()
          throws Exception
Stop the Queue Consumer

Throws:
Exception - if an error occurred stopping

setPriority

void setPriority(int newPriority)
Sets the priority level for the thread. Used by the OS.

Parameters:
newPriority - The priority level to set the thread at


Copyright © 2009-2013. All Rights Reserved.