Stilts 0.1.0-SNAPSHOT

Class SimpleTopicStomplet

  extended by org.projectodd.stilts.stomplet.helpers.AbstractStomplet
      extended by org.projectodd.stilts.stomplet.simple.SimpleSubscribableStomplet
          extended by org.projectodd.stilts.stomplet.simple.SimpleTopicStomplet
All Implemented Interfaces:
MessageSink, Stomplet

public class SimpleTopicStomplet
extends SimpleSubscribableStomplet

Constructor Summary
Method Summary
 void onMessage(StompMessage message)
          Handle a message sent to a destination matched by this stomplet.
Methods inherited from class org.projectodd.stilts.stomplet.simple.SimpleSubscribableStomplet
onSubscribe, onUnsubscribe, send, sendToAllSubscribers, sendToOneSubscriber
Methods inherited from class org.projectodd.stilts.stomplet.helpers.AbstractStomplet
destroy, getStompletConfig, initialize, initialize
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public SimpleTopicStomplet()
Method Detail


public void onMessage(StompMessage message)
               throws StompException
Description copied from interface: Stomplet
Handle a message sent to a destination matched by this stomplet.

In the event the stomplet is servicing multiple destinations, the stomplet may need to inspect the StompMessage for details as to how to handle the incoming message.

If named-segments are present in the applicable routing rule, each named segment is added to the message's header values, prefixed with stomplet..

For instance, the following routing rule:

 ROUTE /queues/:queue_name com.mycorp.MyStomplet

Would result in all inbound messages with matching destinations to have a header named stomplet.queue_name added to it, with the value being the matching portion of the destination.

message - The inbound message.
StompException - If an error occurs while processing the message.

Stilts 0.1.0-SNAPSHOT

Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.