public static ActiveMQTemporaryQueue createTemporaryQueue(final String address, final ActiveMQSession session) { return new ActiveMQTemporaryQueue(address, session); }
@Override public String toString() { return "ActiveMQTemporaryQueue[" + getAddress() + "]"; }
@Override public TemporaryQueue createTemporaryQueue() throws JMSException { // As per spec. section 4.11 if (sessionType == ActiveMQSession.TYPE_TOPIC_SESSION) { throw new IllegalStateException("Cannot create a temporary queue using a TopicSession"); } try { final ActiveMQTemporaryQueue queue; if (enable1xPrefixes) { queue = ActiveMQDestination.createTemporaryQueue(this, PacketImpl.OLD_TEMP_QUEUE_PREFIX.toString()); } else { queue = ActiveMQDestination.createTemporaryQueue(this); } SimpleString simpleAddress = queue.getSimpleAddress(); session.createTemporaryQueue(simpleAddress, RoutingType.ANYCAST, simpleAddress); connection.addTemporaryQueue(simpleAddress); return queue; } catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromActiveMQException(e); } }
@Override public TemporaryQueue createTemporaryQueue() throws JMSException { // As per spec. section 4.11 if (sessionType == ActiveMQSession.TYPE_TOPIC_SESSION) { throw new IllegalStateException("Cannot create a temporary queue using a TopicSession"); } try { final ActiveMQTemporaryQueue queue; if (enable1xPrefixes) { queue = ActiveMQDestination.createTemporaryQueue(this, PacketImpl.OLD_TEMP_QUEUE_PREFIX.toString()); } else { queue = ActiveMQDestination.createTemporaryQueue(this); } SimpleString simpleAddress = queue.getSimpleAddress(); session.createTemporaryQueue(simpleAddress, RoutingType.ANYCAST, simpleAddress); connection.addTemporaryQueue(simpleAddress); return queue; } catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromActiveMQException(e); } }
} else if (addr.startsWith(ActiveMQDestination.TEMP_QUEUE_QUALIFED_PREFIX)) { address = addr.substring(ActiveMQDestination.TEMP_QUEUE_QUALIFED_PREFIX.length()); destination = new ActiveMQTemporaryQueue(address, null); } else if (addr.startsWith(ActiveMQDestination.TEMP_TOPIC_QUALIFED_PREFIX)) { address = addr.substring(ActiveMQDestination.TEMP_TOPIC_QUALIFED_PREFIX.length());
@Override public boolean equals(final Object o) { if (this == o) { return true; } if (!(o instanceof ActiveMQTemporaryQueue)) { return false; } ActiveMQTemporaryQueue that = (ActiveMQTemporaryQueue) o; return super.getAddress().equals(that.getAddress()); }
@Override public TemporaryQueue createTemporaryQueue() throws JMSException { // As per spec. section 4.11 if (sessionType == ActiveMQSession.TYPE_TOPIC_SESSION) { throw new IllegalStateException("Cannot create a temporary queue using a TopicSession"); } try { final ActiveMQTemporaryQueue queue; if (enable1xPrefixes) { queue = ActiveMQDestination.createTemporaryQueue(this, PacketImpl.OLD_TEMP_QUEUE_PREFIX.toString()); } else { queue = ActiveMQDestination.createTemporaryQueue(this); } SimpleString simpleAddress = queue.getSimpleAddress(); session.createTemporaryQueue(simpleAddress, RoutingType.ANYCAST, simpleAddress); connection.addTemporaryQueue(simpleAddress); return queue; } catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromActiveMQException(e); } }
public static ActiveMQTemporaryQueue createTemporaryQueue(final String address, final ActiveMQSession session) { return new ActiveMQTemporaryQueue(address, session); }
@Override public String toString() { return "ActiveMQTemporaryQueue[" + getAddress() + "]"; }
@Override public TemporaryQueue createTemporaryQueue() throws JMSException { // As per spec. section 4.11 if (sessionType == ActiveMQSession.TYPE_TOPIC_SESSION) { throw new IllegalStateException("Cannot create a temporary queue using a TopicSession"); } try { final ActiveMQTemporaryQueue queue; if (enable1xPrefixes) { queue = ActiveMQDestination.createTemporaryQueue(this, PacketImpl.OLD_TEMP_QUEUE_PREFIX.toString()); } else { queue = ActiveMQDestination.createTemporaryQueue(this); } SimpleString simpleAddress = queue.getSimpleAddress(); session.createTemporaryQueue(simpleAddress, RoutingType.ANYCAST, simpleAddress); connection.addTemporaryQueue(simpleAddress); return queue; } catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromActiveMQException(e); } }
public static ActiveMQTemporaryQueue createTemporaryQueue(final String address, final ActiveMQSession session) { return new ActiveMQTemporaryQueue(address, session); }
@Override public String toString() { return "ActiveMQTemporaryQueue[" + getAddress() + "]"; }
@Override public TemporaryQueue createTemporaryQueue() throws JMSException { // As per spec. section 4.11 if (sessionType == ActiveMQSession.TYPE_TOPIC_SESSION) { throw new IllegalStateException("Cannot create a temporary queue using a TopicSession"); } try { final ActiveMQTemporaryQueue queue; if (enable1xPrefixes) { queue = ActiveMQDestination.createTemporaryQueue(this, PacketImpl.OLD_TEMP_QUEUE_PREFIX.toString()); } else { queue = ActiveMQDestination.createTemporaryQueue(this); } SimpleString simpleAddress = queue.getSimpleAddress(); session.createTemporaryQueue(simpleAddress, RoutingType.ANYCAST, simpleAddress); connection.addTemporaryQueue(simpleAddress); return queue; } catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromActiveMQException(e); } }
public static ActiveMQTemporaryQueue createTemporaryQueue(final String address, final ActiveMQSession session) { return new ActiveMQTemporaryQueue(address, session); }
@Override public String toString() { return "ActiveMQTemporaryQueue[" + getAddress() + "]"; }
public static ActiveMQTemporaryQueue createTemporaryQueue(final String address, final ActiveMQSession session) { return new ActiveMQTemporaryQueue(address, session); }
@Override public String toString() { return "ActiveMQTemporaryQueue[" + getAddress() + "]"; }
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; }
@Override public boolean equals(final Object o) { if (this == o) { return true; } if (!(o instanceof ActiveMQTemporaryQueue)) { return false; } ActiveMQTemporaryQueue that = (ActiveMQTemporaryQueue) o; return super.getAddress().equals(that.getAddress()); }
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; }