unprefixedName = unprefixedName.substring(PacketImpl.OLD_TEMP_TOPIC_PREFIX.length()); destination.setName(unprefixedName);
@Override public Destination getJMSDestination() throws JMSException { if (dest == null) { SimpleString address = message.getAddressSimpleString(); SimpleString name = address; if (address != null & enable1xPrefixes) { dest = ActiveMQDestination.fromPrefixedName(get1xPrefixedName(address.toString())); } else { if (address == null) { dest = null; } else if (RoutingType.ANYCAST.equals(message.getRoutingType())) { dest = ActiveMQDestination.createQueue(address); } else if (RoutingType.MULTICAST.equals(message.getRoutingType())) { dest = ActiveMQDestination.createTopic(address); } else { dest = (ActiveMQDestination) ActiveMQDestination.fromPrefixedName(address.toString()); } if (name != null) { ((ActiveMQDestination) dest).setName(name.toString()); } } } return dest; }
public static Destination fromPrefixedName(final String addr, final String name) { ActiveMQDestination destination; if (addr.startsWith(ActiveMQDestination.QUEUE_QUALIFIED_PREFIX)) { String address = addr.substring(ActiveMQDestination.QUEUE_QUALIFIED_PREFIX.length()); destination = createQueue(address); } else if (addr.startsWith(ActiveMQDestination.TOPIC_QUALIFIED_PREFIX)) { String address = addr.substring(ActiveMQDestination.TOPIC_QUALIFIED_PREFIX.length()); destination = createTopic(address); } else if (addr.startsWith(ActiveMQDestination.TEMP_QUEUE_QUALIFED_PREFIX)) { String address = addr.substring(ActiveMQDestination.TEMP_QUEUE_QUALIFED_PREFIX.length()); destination = new ActiveMQTemporaryQueue(address, null); } else if (addr.startsWith(ActiveMQDestination.TEMP_TOPIC_QUALIFED_PREFIX)) { String address = addr.substring(ActiveMQDestination.TEMP_TOPIC_QUALIFED_PREFIX.length()); destination = new ActiveMQTemporaryTopic(address, null); } else { destination = new ActiveMQDestination(addr, TYPE.DESTINATION, null); } String unprefixedName = name; if (name.startsWith(ActiveMQDestination.QUEUE_QUALIFIED_PREFIX)) { unprefixedName = name.substring(ActiveMQDestination.QUEUE_QUALIFIED_PREFIX.length()); } else if (name.startsWith(ActiveMQDestination.TOPIC_QUALIFIED_PREFIX)) { unprefixedName = name.substring(ActiveMQDestination.TOPIC_QUALIFIED_PREFIX.length()); } else if (name.startsWith(ActiveMQDestination.TEMP_QUEUE_QUALIFED_PREFIX)) { unprefixedName = name.substring(ActiveMQDestination.TEMP_QUEUE_QUALIFED_PREFIX.length()); } else if (name.startsWith(ActiveMQDestination.TEMP_TOPIC_QUALIFED_PREFIX)) { unprefixedName = name.substring(ActiveMQDestination.TEMP_TOPIC_QUALIFED_PREFIX.length()); } destination.setName(unprefixedName); return destination; }
public static Destination fromPrefixedName(final String addr, final String name) { ActiveMQDestination destination; if (addr.startsWith(ActiveMQDestination.QUEUE_QUALIFIED_PREFIX)) { String address = addr.substring(ActiveMQDestination.QUEUE_QUALIFIED_PREFIX.length()); destination = createQueue(address); } else if (addr.startsWith(ActiveMQDestination.TOPIC_QUALIFIED_PREFIX)) { String address = addr.substring(ActiveMQDestination.TOPIC_QUALIFIED_PREFIX.length()); destination = createTopic(address); } else if (addr.startsWith(ActiveMQDestination.TEMP_QUEUE_QUALIFED_PREFIX)) { String address = addr.substring(ActiveMQDestination.TEMP_QUEUE_QUALIFED_PREFIX.length()); destination = new ActiveMQTemporaryQueue(address, null); } else if (addr.startsWith(ActiveMQDestination.TEMP_TOPIC_QUALIFED_PREFIX)) { String address = addr.substring(ActiveMQDestination.TEMP_TOPIC_QUALIFED_PREFIX.length()); destination = new ActiveMQTemporaryTopic(address, null); } else { destination = new ActiveMQDestination(addr, TYPE.DESTINATION, null); } String unprefixedName = name; if (name.startsWith(ActiveMQDestination.QUEUE_QUALIFIED_PREFIX)) { unprefixedName = name.substring(ActiveMQDestination.QUEUE_QUALIFIED_PREFIX.length()); } else if (name.startsWith(ActiveMQDestination.TOPIC_QUALIFIED_PREFIX)) { unprefixedName = name.substring(ActiveMQDestination.TOPIC_QUALIFIED_PREFIX.length()); } else if (name.startsWith(ActiveMQDestination.TEMP_QUEUE_QUALIFED_PREFIX)) { unprefixedName = name.substring(ActiveMQDestination.TEMP_QUEUE_QUALIFED_PREFIX.length()); } else if (name.startsWith(ActiveMQDestination.TEMP_TOPIC_QUALIFED_PREFIX)) { unprefixedName = name.substring(ActiveMQDestination.TEMP_TOPIC_QUALIFED_PREFIX.length()); } destination.setName(unprefixedName); return destination; }
unprefixedName = unprefixedName.substring(PacketImpl.OLD_TEMP_TOPIC_PREFIX.length()); destination.setName(unprefixedName);
unprefixedName = unprefixedName.substring(PacketImpl.OLD_TEMP_TOPIC_PREFIX.length()); destination.setName(unprefixedName);
public static Destination fromPrefixed1XName(final String addr, final String name) { ActiveMQDestination destination; if (addr.startsWith(PacketImpl.OLD_QUEUE_PREFIX.toString())) { destination = createQueue(addr); } else if (addr.startsWith(PacketImpl.OLD_TOPIC_PREFIX.toString())) { destination = createTopic(addr); } else if (addr.startsWith(PacketImpl.OLD_TEMP_QUEUE_PREFIX.toString())) { destination = new ActiveMQTemporaryQueue(addr, null); } else if (addr.startsWith(PacketImpl.OLD_TEMP_TOPIC_PREFIX.toString())) { destination = new ActiveMQTemporaryTopic(addr, null); } else { destination = new ActiveMQDestination(addr, TYPE.DESTINATION, null); } String unprefixedName = name; if (name.startsWith(PacketImpl.OLD_QUEUE_PREFIX.toString())) { unprefixedName = name.substring(PacketImpl.OLD_QUEUE_PREFIX.length()); } else if (name.startsWith(PacketImpl.OLD_TOPIC_PREFIX.toString())) { unprefixedName = name.substring(PacketImpl.OLD_TOPIC_PREFIX.length()); } else if (name.startsWith(PacketImpl.OLD_TEMP_QUEUE_PREFIX.toString())) { unprefixedName = name.substring(PacketImpl.OLD_TEMP_QUEUE_PREFIX.length()); } else if (name.startsWith(PacketImpl.OLD_TEMP_TOPIC_PREFIX.toString())) { unprefixedName = name.substring(PacketImpl.OLD_TEMP_TOPIC_PREFIX.length()); } destination.setName(unprefixedName); return destination; }
public static Destination fromPrefixed1XName(final String addr, final String name) { ActiveMQDestination destination; if (addr.startsWith(PacketImpl.OLD_QUEUE_PREFIX.toString())) { destination = createQueue(addr); } else if (addr.startsWith(PacketImpl.OLD_TOPIC_PREFIX.toString())) { destination = createTopic(addr); } else if (addr.startsWith(PacketImpl.OLD_TEMP_QUEUE_PREFIX.toString())) { destination = new ActiveMQTemporaryQueue(addr, null); } else if (addr.startsWith(PacketImpl.OLD_TEMP_TOPIC_PREFIX.toString())) { destination = new ActiveMQTemporaryTopic(addr, null); } else { destination = new ActiveMQDestination(addr, TYPE.DESTINATION, null); } String unprefixedName = name; if (name.startsWith(PacketImpl.OLD_QUEUE_PREFIX.toString())) { unprefixedName = name.substring(PacketImpl.OLD_QUEUE_PREFIX.length()); } else if (name.startsWith(PacketImpl.OLD_TOPIC_PREFIX.toString())) { unprefixedName = name.substring(PacketImpl.OLD_TOPIC_PREFIX.length()); } else if (name.startsWith(PacketImpl.OLD_TEMP_QUEUE_PREFIX.toString())) { unprefixedName = name.substring(PacketImpl.OLD_TEMP_QUEUE_PREFIX.length()); } else if (name.startsWith(PacketImpl.OLD_TEMP_TOPIC_PREFIX.toString())) { unprefixedName = name.substring(PacketImpl.OLD_TEMP_TOPIC_PREFIX.length()); } destination.setName(unprefixedName); return destination; }
@Override public Destination getJMSDestination() throws JMSException { if (dest == null) { SimpleString address = message.getAddressSimpleString(); SimpleString changedAddress = checkPrefix(address); if (address == null) { dest = null; } else if (RoutingType.ANYCAST.equals(message.getRoutingType())) { dest = ActiveMQDestination.createQueue(address); } else if (RoutingType.MULTICAST.equals(message.getRoutingType())) { dest = ActiveMQDestination.createTopic(address); } else { dest = (ActiveMQDestination) ActiveMQDestination.fromPrefixedName(address.toString()); } if (changedAddress != null && dest != null) { ((ActiveMQDestination) dest).setName(changedAddress.toString()); } } return dest; }
@Override public Destination getJMSDestination() throws JMSException { if (dest == null) { SimpleString address = message.getAddressSimpleString(); SimpleString changedAddress = checkPrefix(address); if (address == null) { dest = null; } else if (RoutingType.ANYCAST.equals(message.getRoutingType())) { dest = ActiveMQDestination.createQueue(address); } else if (RoutingType.MULTICAST.equals(message.getRoutingType())) { dest = ActiveMQDestination.createTopic(address); } else { dest = (ActiveMQDestination) ActiveMQDestination.fromPrefixedName(address.toString()); } if (changedAddress != null && dest != null) { ((ActiveMQDestination) dest).setName(changedAddress.toString()); } } return dest; }
@Override public Destination getJMSDestination() throws JMSException { if (dest == null) { SimpleString address = message.getAddressSimpleString(); SimpleString name = address; if (address != null & enable1xPrefixes) { dest = ActiveMQDestination.fromPrefixedName(get1xPrefixedName(address.toString())); } else { if (address == null) { dest = null; } else if (RoutingType.ANYCAST.equals(message.getRoutingType())) { dest = ActiveMQDestination.createQueue(address); } else if (RoutingType.MULTICAST.equals(message.getRoutingType())) { dest = ActiveMQDestination.createTopic(address); } else { dest = (ActiveMQDestination) ActiveMQDestination.fromPrefixedName(address.toString()); } if (name != null) { ((ActiveMQDestination) dest).setName(name.toString()); } } } return dest; }
@Override public Destination getJMSDestination() throws JMSException { if (dest == null) { SimpleString address = message.getAddressSimpleString(); SimpleString name = address; if (address != null & enable1xPrefixes) { dest = ActiveMQDestination.fromPrefixedName(get1xPrefixedName(address.toString())); } else { if (address == null) { dest = null; } else if (RoutingType.ANYCAST.equals(message.getRoutingType())) { dest = ActiveMQDestination.createQueue(address); } else if (RoutingType.MULTICAST.equals(message.getRoutingType())) { dest = ActiveMQDestination.createTopic(address); } else { dest = (ActiveMQDestination) ActiveMQDestination.fromPrefixedName(address.toString()); } if (name != null) { ((ActiveMQDestination) dest).setName(name.toString()); } } } return dest; }