1 18 package org.apache.activemq.openwire.v1; 19 20 import java.io.DataInputStream ; 21 import java.io.DataOutputStream ; 22 import java.io.IOException ; 23 24 import org.apache.activemq.openwire.*; 25 import org.apache.activemq.command.*; 26 27 28 39 public class ConsumerInfoTest extends BaseCommandTestSupport { 40 41 42 public static ConsumerInfoTest SINGLETON = new ConsumerInfoTest(); 43 44 public Object createObject() throws Exception { 45 ConsumerInfo info = new ConsumerInfo(); 46 populateObject(info); 47 return info; 48 } 49 50 51 protected void populateObject(Object object) throws Exception { 52 super.populateObject(object); 53 ConsumerInfo info = (ConsumerInfo) object; 54 info.setConsumerId(createConsumerId("ConsumerId:1")); 55 info.setBrowser(true); 56 info.setDestination(createActiveMQDestination("Destination:2")); 57 info.setPrefetchSize(1); 58 info.setMaximumPendingMessageLimit(2); 59 info.setDispatchAsync(false); 60 info.setSelector("Selector:3"); 61 info.setSubscriptionName("SubcriptionName:4"); 62 info.setNoLocal(true); 63 info.setExclusive(false); 64 info.setRetroactive(true); 65 info.setPriority((byte) 1); 66 67 { 68 BrokerId value[] = new BrokerId[2]; 69 for( int i=0; i < 2; i++ ) { 70 value[i] = createBrokerId("BrokerPath:5"); 71 } 72 info.setBrokerPath(value); 73 } 74 info.setAdditionalPredicate(createBooleanExpression("AdditionalPredicate:6")); 75 info.setNetworkSubscription(false); 76 info.setOptimizedAcknowledge(true); 77 info.setNoRangeAcks(false); 78 79 } 80 } 81 | Popular Tags |