/** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQTempTopic(); }
public String getTopicName() throws JMSException { return getPhysicalName(); }
/** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQTempTopic(); }
public String getTopicName() throws JMSException { return getPhysicalName(); }
/** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQTempTopic(); }
public String getTopicName() throws JMSException { return getPhysicalName(); }
/** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQTempTopic(); }
public String getTopicName() throws JMSException { return getPhysicalName(); }
/** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQTempTopic(); }
public String getTopicName() throws JMSException { return getPhysicalName(); }
/** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQTempTopic(); }
/** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQTempTopic(); }
/** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQTempTopic(); }
/** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQTempTopic(); }
public void setTempTopic(boolean flag){ setDestination(new ActiveMQTempTopic(">")); }
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); } }
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 topic identity given a <CODE>Topic</CODE> name. * <P> * This facility is provided for the rare cases where clients need to * dynamically manipulate topic identity. This allows the creation of a * topic 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 topic. The * physical creation of topics is an administrative task and is not to be * initiated by the JMS API. The one exception is the creation of temporary * topics, which is accomplished with the <CODE>createTemporaryTopic</CODE> * method. * * @param topicName the name of this <CODE>Topic</CODE> * @return a <CODE>Topic</CODE> with the given name * @throws JMSException if the session fails to create a topic due to some * internal error. * @since 1.1 */ @Override public Topic createTopic(String topicName) throws JMSException { checkClosed(); if (topicName.startsWith(ActiveMQDestination.TEMP_DESTINATION_NAME_PREFIX)) { return new ActiveMQTempTopic(topicName); } return new ActiveMQTopic(topicName); }
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"); } }
/** * Create the DestinationInfo object for the temporary destination. * * @param topic - if its true topic, else queue. * @return DestinationInfo * @throws JMSException */ protected ActiveMQTempDestination createTempDestination(boolean topic) throws JMSException { // Check if Destination info is of temporary type. ActiveMQTempDestination dest; if (topic) { dest = new ActiveMQTempTopic(info.getConnectionId(), tempDestinationIdGenerator.getNextSequenceId()); } else { dest = new ActiveMQTempQueue(info.getConnectionId(), tempDestinationIdGenerator.getNextSequenceId()); } DestinationInfo info = new DestinationInfo(); info.setConnectionId(this.info.getConnectionId()); info.setOperationType(DestinationInfo.ADD_OPERATION_TYPE); info.setDestination(dest); syncSendPacket(info); dest.setConnection(this); activeTempDestinations.put(dest, dest); return dest; }