1 7 package org.jboss.messaging.channel.plugins.handler; 8 9 import org.jboss.messaging.interfaces.*; 10 import org.jboss.messaging.interfaces.Consumer; 11 import org.jboss.messaging.interfaces.MessageReference; 12 13 19 public class ExclusiveChannelHandler extends AbstractChannelHandler 20 { 21 23 25 26 private Consumer consumer; 27 28 30 32 37 public ExclusiveChannelHandler(MessageSet messages) 38 { 39 super(messages); 40 } 41 42 44 46 protected void addConsumer(Consumer consumer, long wait) 47 { 48 this.consumer = consumer; 49 } 50 51 protected Consumer findConsumer(MessageReference reference) 52 { 53 if (consumer != null) 55 { 56 Consumer result = consumer; 57 consumer = null; 58 return result; 59 } 60 return null; 61 } 62 63 protected void removeConsumer(Consumer consumer) 64 { 65 consumer = null; 66 } 67 68 70 72 74 } 76 | Popular Tags |