Package org.apache.storm.jms
Interface JmsTupleProducer
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
JsonTupleProducer
public interface JmsTupleProducer extends Serializable
Interface to define classes that can produce a StormValuesobjects from ajavax.jms.Messageobject>.Implementations are also responsible for declaring the output fields they produce.
If for some reason the implementation can't process a message (for example if it received a
javax.jms.ObjectMessagewhen it was expecting ajavax.jms.TextMessageit should returnnullto indicate to theJmsSpoutthat the message could not be processed.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddeclareOutputFields(OutputFieldsDeclarer declarer)Declare the output fields produced by this JmsTupleProducer.ValuestoTuple(javax.jms.Message msg)Process a JMS message object to create a Values object.
-
-
-
Method Detail
-
toTuple
Values toTuple(javax.jms.Message msg) throws javax.jms.JMSException
Process a JMS message object to create a Values object.- Parameters:
msg- - the JMS message- Returns:
- the Values tuple, or null if the message couldn't be processed.
- Throws:
javax.jms.JMSException
-
declareOutputFields
void declareOutputFields(OutputFieldsDeclarer declarer)
Declare the output fields produced by this JmsTupleProducer.- Parameters:
declarer- The OuputFieldsDeclarer for the spout.
-
-