org.apache.hadoop.chukwa.datacollection.adaptor.jms
Interface JMSMessageTransformer

All Known Implementing Classes:
JMSMessagePropertyTransformer, JMSTextMessageTransformer

public interface JMSMessageTransformer

Class that knows how to transform a JMS Message to a byte array. The byte array will become the bytes bound to the Chukwa chunk.


Method Summary
 String parseArgs(String args)
          Parse any transformer-specific args to initialize the transformer.
 byte[] transform(javax.jms.Message message)
          Transform a Message to an array of bytes.
 

Method Detail

parseArgs

String parseArgs(String args)
Parse any transformer-specific args to initialize the transformer. Return a null if the arguments could not be parsed. This method will always be invoked before transform is called only if transformer arguments were passed. If they weren't, this method will never be called.

Parameters:
args - Arguments needed to configur the transformer.
Returns:

transform

byte[] transform(javax.jms.Message message)
                 throws javax.jms.JMSException
Transform a Message to an array of bytes. Return null for a message that should be ignored.

Parameters:
message - JMS message received by a JMS Adaptor.
Returns:
the bytes that should be bound to the Chukwa chunk.
Throws:
javax.jms.JMSException


Copyright © 2011 Apache Software Foundation. All Rights Reserved.