The foundation of message and event parsing in ActiveBlaze is the BlazeMessage.
A BlazeMessage is a a Map of key value pairs, where the keys are strings and the values are primitive objects.

The values supported are:

  • byte
  • bytes[]
  • char
  • short
  • int
  • long
  • float
  • double
  • Map (supports recursion)

You can create a BlazeMessage by its default constructor - e.g.

 import org.apache.activeblaze.*;

 BlazeMessage msg = new BlazeMessage();

There's a few utility methods to support passing around standard objects - e.g.

 import org.apache.activeblaze.*;

 BlazeMessage msg = new BlazeMessage("test string");
 String text = msg.getText();

 BlazeMessage msg = new BlazeMessage();
 msg.setText("test string");
 String text = msg.getText();

 byte[] data = getSomeData();
 BlazeMessage msg = new BlazeMessage(data);
 byte[] result  = msg.getBytes();

 BlazeMessage msg = new BlazeMessage();
 byte[] result = msg.getData();


 Date date = new Date();
 BlazeMessage msg = new BlazeMessage(date);
 Date result = msg.getObject();

 BlazeMessage msg = new BlazeMessage();
 Object result = msg.getObject();

© 2004-2011 The Apache Software Foundation.
Apache ActiveMQ, ActiveMQ, Apache, the Apache feather logo, and the Apache ActiveMQ project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
Graphic Design By Hiram