Refine search
private ActiveMQDestination convert(int type, String name) { switch (KahaDestination.DestinationType.valueOf(type)) { case QUEUE: return new ActiveMQQueue(name); case TOPIC: return new ActiveMQTopic(name); case TEMP_QUEUE: return new ActiveMQTempQueue(name); case TEMP_TOPIC: return new ActiveMQTempTopic(name); default: throw new IllegalArgumentException("Not in the valid destination format"); } }
public String getQueueName() throws JMSException { return getPhysicalName(); }
/** * Creates a queue identity given a <CODE>Queue</CODE> name. * <P> * This facility is provided for the rare cases where clients need to * dynamically manipulate queue identity. It allows the creation of a queue * identity with a provider-specific name. Clients that depend on this * ability are not portable. * <P> * Note that this method is not for creating the physical queue. The * physical creation of queues is an administrative task and is not to be * initiated by the JMS API. The one exception is the creation of temporary * queues, which is accomplished with the <CODE>createTemporaryQueue</CODE> * method. * * @param queueName the name of this <CODE>Queue</CODE> * @return a <CODE>Queue</CODE> with the given name * @throws JMSException if the session fails to create a queue due to some * internal error. * @since 1.1 */ @Override public Queue createQueue(String queueName) throws JMSException { checkClosed(); if (queueName.startsWith(ActiveMQDestination.TEMP_DESTINATION_NAME_PREFIX)) { return new ActiveMQTempQueue(queueName); } return new ActiveMQQueue(queueName); }
/** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQTempQueue(); }
/** * Creates a queue identity given a <CODE>Queue</CODE> name. * <P> * This facility is provided for the rare cases where clients need to * dynamically manipulate queue identity. It allows the creation of a queue * identity with a provider-specific name. Clients that depend on this * ability are not portable. * <P> * Note that this method is not for creating the physical queue. The * physical creation of queues is an administrative task and is not to be * initiated by the JMS API. The one exception is the creation of temporary * queues, which is accomplished with the <CODE>createTemporaryQueue</CODE> * method. * * @param queueName the name of this <CODE>Queue</CODE> * @return a <CODE>Queue</CODE> with the given name * @throws JMSException if the session fails to create a queue due to some * internal error. * @since 1.1 */ @Override public Queue createQueue(String queueName) throws JMSException { checkClosed(); if (queueName.startsWith(ActiveMQDestination.TEMP_DESTINATION_NAME_PREFIX)) { return new ActiveMQTempQueue(queueName); } return new ActiveMQQueue(queueName); }
/** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQTempQueue(); }
public static ActiveMQDestination createDestination(String name, byte defaultType) { if (name.startsWith(QUEUE_QUALIFIED_PREFIX)) { return new ActiveMQQueue(name.substring(QUEUE_QUALIFIED_PREFIX.length())); } else if (name.startsWith(TOPIC_QUALIFIED_PREFIX)) { return new ActiveMQTopic(name.substring(TOPIC_QUALIFIED_PREFIX.length())); } else if (name.startsWith(TEMP_QUEUE_QUALIFED_PREFIX)) { return new ActiveMQTempQueue(name.substring(TEMP_QUEUE_QUALIFED_PREFIX.length())); } else if (name.startsWith(TEMP_TOPIC_QUALIFED_PREFIX)) { return new ActiveMQTempTopic(name.substring(TEMP_TOPIC_QUALIFED_PREFIX.length())); } switch (defaultType) { case QUEUE_TYPE: return new ActiveMQQueue(name); case TOPIC_TYPE: return new ActiveMQTopic(name); case TEMP_QUEUE_TYPE: return new ActiveMQTempQueue(name); case TEMP_TOPIC_TYPE: return new ActiveMQTempTopic(name); default: throw new IllegalArgumentException("Invalid default destination type: " + defaultType); } }
/** * Creates a queue identity given a <CODE>Queue</CODE> name. * <P> * This facility is provided for the rare cases where clients need to * dynamically manipulate queue identity. It allows the creation of a queue * identity with a provider-specific name. Clients that depend on this * ability are not portable. * <P> * Note that this method is not for creating the physical queue. The * physical creation of queues is an administrative task and is not to be * initiated by the JMS API. The one exception is the creation of temporary * queues, which is accomplished with the <CODE>createTemporaryQueue</CODE> * method. * * @param queueName the name of this <CODE>Queue</CODE> * @return a <CODE>Queue</CODE> with the given name * @throws JMSException if the session fails to create a queue due to some * internal error. * @since 1.1 */ @Override public Queue createQueue(String queueName) throws JMSException { checkClosed(); if (queueName.startsWith(ActiveMQDestination.TEMP_DESTINATION_NAME_PREFIX)) { return new ActiveMQTempQueue(queueName); } return new ActiveMQQueue(queueName); }
/** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQTempQueue(); }
public String getQueueName() throws JMSException { return getPhysicalName(); }
ActiveMQDestination convert(String dest) { int p = dest.indexOf(":"); if( p<0 ) { throw new IllegalArgumentException("Not in the valid destination format"); } int type = Integer.parseInt(dest.substring(0, p)); String name = dest.substring(p+1); switch( KahaDestination.DestinationType.valueOf(type) ) { case QUEUE: return new ActiveMQQueue(name); case TOPIC: return new ActiveMQTopic(name); case TEMP_QUEUE: return new ActiveMQTempQueue(name); case TEMP_TOPIC: return new ActiveMQTempTopic(name); default: throw new IllegalArgumentException("Not in the valid destination format"); } }
/** * Creates a queue identity given a <CODE>Queue</CODE> name. * <P> * This facility is provided for the rare cases where clients need to * dynamically manipulate queue identity. It allows the creation of a queue * identity with a provider-specific name. Clients that depend on this * ability are not portable. * <P> * Note that this method is not for creating the physical queue. The * physical creation of queues is an administrative task and is not to be * initiated by the JMS API. The one exception is the creation of temporary * queues, which is accomplished with the <CODE>createTemporaryQueue</CODE> * method. * * @param queueName the name of this <CODE>Queue</CODE> * @return a <CODE>Queue</CODE> with the given name * @throws JMSException if the session fails to create a queue due to some * internal error. * @since 1.1 */ public Queue createQueue(String queueName) throws JMSException { checkClosed(); if (queueName.startsWith(ActiveMQDestination.TEMP_DESTINATION_NAME_PREFIX)) { return new ActiveMQTempQueue(queueName); } return new ActiveMQQueue(queueName); }
/** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQTempQueue(); }
public String getQueueName() throws JMSException { return getPhysicalName(); }
String topicName = ((Topic) dest).getTopicName(); if (queueName != null && topicName == null) { return new ActiveMQQueue(queueName); } else if (queueName == null && topicName != null) { return new ActiveMQTopic(topicName); } else { return unresolvableDestinationTransformer.transform(dest); return new ActiveMQTempQueue(((TemporaryQueue) dest).getQueueName()); return new ActiveMQQueue(((Queue) dest).getQueueName()); return new ActiveMQTopic(((Topic) dest).getTopicName());
/** * Creates a queue identity given a <CODE>Queue</CODE> name. * <P> * This facility is provided for the rare cases where clients need to * dynamically manipulate queue identity. It allows the creation of a queue * identity with a provider-specific name. Clients that depend on this * ability are not portable. * <P> * Note that this method is not for creating the physical queue. The * physical creation of queues is an administrative task and is not to be * initiated by the JMS API. The one exception is the creation of temporary * queues, which is accomplished with the <CODE>createTemporaryQueue</CODE> * method. * * @param queueName the name of this <CODE>Queue</CODE> * @return a <CODE>Queue</CODE> with the given name * @throws JMSException if the session fails to create a queue due to some * internal error. * @since 1.1 */ @Override public Queue createQueue(String queueName) throws JMSException { checkClosed(); if (queueName.startsWith(ActiveMQDestination.TEMP_DESTINATION_NAME_PREFIX)) { return new ActiveMQTempQueue(queueName); } return new ActiveMQQueue(queueName); }
/** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQTempQueue(); }
public String getQueueName() throws JMSException { return getPhysicalName(); }
private ActiveMQDestination convert(int type, String name) { switch (KahaDestination.DestinationType.valueOf(type)) { case QUEUE: return new ActiveMQQueue(name); case TOPIC: return new ActiveMQTopic(name); case TEMP_QUEUE: return new ActiveMQTempQueue(name); case TEMP_TOPIC: return new ActiveMQTempTopic(name); default: throw new IllegalArgumentException("Not in the valid destination format"); } }
/** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQTempQueue(); }