@Test public void testGetDeliveryMode() { int deliveryMode = DeliveryMode.NON_PERSISTENT; DeliveryModeType type = getDeliveryMode(deliveryMode); assertEquals(DeliveryModeType.NON_PERSISTENT, type); deliveryMode = DeliveryMode.PERSISTENT; type = getDeliveryMode(deliveryMode); assertEquals(DeliveryModeType.PERSISTENT, type); deliveryMode = -1; type = getDeliveryMode(deliveryMode); assertEquals(DeliveryModeType.UNKNOWN, type); }
static DeliveryModeType getDeliveryMode(int deliveryMode) { DeliveryModeType mode; switch (deliveryMode) { case DeliveryMode.NON_PERSISTENT: mode = DeliveryModeType.NON_PERSISTENT; break; case DeliveryMode.PERSISTENT: mode = DeliveryModeType.PERSISTENT; break; default: mode = DeliveryModeType.UNKNOWN; break; } return mode; }
JMSPluginUtils { static DeliveryModeType getDeliveryMode(int deliveryMode) { DeliveryModeType mode; switch (deliveryMode) { case DeliveryMode.NON_PERSISTENT: mode = DeliveryModeType.NON_PERSISTENT; break; case DeliveryMode.PERSISTENT: mode = DeliveryModeType.PERSISTENT; break; default: mode = DeliveryModeType.UNKNOWN; break; } return mode; } }
JMSPluginUtils { static DeliveryModeType getDeliveryMode(int deliveryMode) { DeliveryModeType mode; switch (deliveryMode) { case DeliveryMode.NON_PERSISTENT: mode = DeliveryModeType.NON_PERSISTENT; break; case DeliveryMode.PERSISTENT: mode = DeliveryModeType.PERSISTENT; break; default: mode = DeliveryModeType.UNKNOWN; break; } return mode; } private  JMSPluginUtils(); }
JMSPluginUtils { static DeliveryModeType getDeliveryMode(int deliveryMode) { DeliveryModeType mode; switch (deliveryMode) { case DeliveryMode.NON_PERSISTENT: mode = DeliveryModeType.NON_PERSISTENT; break; case DeliveryMode.PERSISTENT: mode = DeliveryModeType.PERSISTENT; break; default: mode = DeliveryModeType.UNKNOWN; break; } return mode; } private  JMSPluginUtils();  }
JMSPluginUtils { static DeliveryModeType getDeliveryMode(int deliveryMode) { DeliveryModeType mode; switch (deliveryMode) { case DeliveryMode.NON_PERSISTENT: mode = DeliveryModeType.NON_PERSISTENT; break; case DeliveryMode.PERSISTENT: mode = DeliveryModeType.PERSISTENT; break; default: mode = DeliveryModeType.UNKNOWN; break; } return mode; } private  JMSPluginUtils();   }