org.apache.camel.component.jms.reply
Class MessageSelectorCreator

java.lang.Object
  extended by org.apache.camel.component.jms.reply.MessageSelectorCreator
All Implemented Interfaces:
CorrelationListener

public class MessageSelectorCreator
extends Object
implements CorrelationListener

A creator which can build the JMS message selector query string to use with a shared reply-to queue, so we can select the correct messages we expect as replies.


Field Summary
protected  ConcurrentSkipListSet<String> correlationIds
           
protected  boolean dirty
           
protected  StringBuilder expression
           
protected static org.slf4j.Logger LOG
           
protected  CorrelationTimeoutMap timeoutMap
           
 
Constructor Summary
MessageSelectorCreator(CorrelationTimeoutMap timeoutMap)
           
 
Method Summary
 String get()
           
 void onEviction(String key)
          Callback when a correlation id is evicted due timeout
 void onPut(String key)
          Callback when a new correlation id is added
 void onRemove(String key)
          Callback when a correlation id is removed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final org.slf4j.Logger LOG

timeoutMap

protected final CorrelationTimeoutMap timeoutMap

correlationIds

protected final ConcurrentSkipListSet<String> correlationIds

dirty

protected volatile boolean dirty

expression

protected StringBuilder expression
Constructor Detail

MessageSelectorCreator

public MessageSelectorCreator(CorrelationTimeoutMap timeoutMap)
Method Detail

get

public String get()

onPut

public void onPut(String key)
Description copied from interface: CorrelationListener
Callback when a new correlation id is added

Specified by:
onPut in interface CorrelationListener
Parameters:
key - the correlation id

onRemove

public void onRemove(String key)
Description copied from interface: CorrelationListener
Callback when a correlation id is removed

Specified by:
onRemove in interface CorrelationListener
Parameters:
key - the correlation id

onEviction

public void onEviction(String key)
Description copied from interface: CorrelationListener
Callback when a correlation id is evicted due timeout

Specified by:
onEviction in interface CorrelationListener
Parameters:
key - the correlation id


Apache Camel