1 7 package org.jboss.jms; 8 9 import javax.jms.DeliveryMode ; 10 import javax.jms.JMSException ; 11 12 18 public class JMSValidator 19 { 20 22 24 26 32 public static void validateDeliveryMode(int deliveryMode) 33 throws JMSException 34 { 35 if (deliveryMode != DeliveryMode.NON_PERSISTENT && 36 deliveryMode != DeliveryMode.PERSISTENT) 37 throw new JMSException ("Invalid delivery mode " + deliveryMode); 38 } 39 40 46 public static void validatePriority(int priority) 47 throws JMSException 48 { 49 if (priority < 0 || priority > 9) 50 throw new JMSException ("Invalid priority " + priority); 51 } 52 53 59 public static void validateTimeToLive(long timeToLive) 60 throws JMSException 61 { 62 } 63 64 66 68 70 72 74 } 76 | Popular Tags |