use of org.apache.activemq.command.ActiveMQTempQueue in project activemq-artemis by apache.
the class ActiveMQTempQueueTest method populateObject.
@Override
protected void populateObject(Object object) throws Exception {
super.populateObject(object);
ActiveMQTempQueue info = (ActiveMQTempQueue) object;
}
use of org.apache.activemq.command.ActiveMQTempQueue in project activemq-artemis by apache.
the class MessageTransformationTest method testTransformDestination.
/**
* Tests transforming destinations into ActiveMQ's destination
* implementation.
*/
public void testTransformDestination() throws Exception {
assertTrue("Transforming a TempQueue destination to an ActiveMQTempQueue", ActiveMQMessageTransformation.transformDestination(new ActiveMQTempQueue()) instanceof ActiveMQTempQueue);
assertTrue("Transforming a TempTopic destination to an ActiveMQTempTopic", ActiveMQMessageTransformation.transformDestination(new ActiveMQTempTopic()) instanceof ActiveMQTempTopic);
assertTrue("Transforming a Queue destination to an ActiveMQQueue", ActiveMQMessageTransformation.transformDestination(new ActiveMQQueue()) instanceof ActiveMQQueue);
assertTrue("Transforming a Topic destination to an ActiveMQTopic", ActiveMQMessageTransformation.transformDestination(new ActiveMQTopic()) instanceof ActiveMQTopic);
assertTrue("Transforming a Destination to an ActiveMQDestination", ActiveMQMessageTransformation.transformDestination(new ActiveMQTopic()) instanceof ActiveMQDestination);
}
use of org.apache.activemq.command.ActiveMQTempQueue in project activemq-artemis by apache.
the class OpenWireConnection method tempQueueDeleted.
@Override
public void tempQueueDeleted(SimpleString bindingName) {
ActiveMQDestination dest = new ActiveMQTempQueue(bindingName.toString());
state.removeTempDestination(dest);
if (!AdvisorySupport.isAdvisoryTopic(dest)) {
AMQConnectionContext context = getContext();
DestinationInfo advInfo = new DestinationInfo(context.getConnectionId(), DestinationInfo.REMOVE_OPERATION_TYPE, dest);
ActiveMQTopic topic = AdvisorySupport.getDestinationAdvisoryTopic(dest);
try {
protocolManager.fireAdvisory(context, topic, advInfo);
} catch (Exception e) {
logger.warn("Failed to fire advisory on " + topic, e);
}
}
}
use of org.apache.activemq.command.ActiveMQTempQueue in project activemq-artemis by apache.
the class DestinationMapTempDestinationTest method testtestTempDestinations.
public void testtestTempDestinations() throws Exception {
ConnectionId id = new ConnectionId(new IdGenerator().generateId());
DestinationMap map = new DestinationMap();
Object value = new Object();
int count = 1000;
for (int i = 0; i < count; i++) {
ActiveMQTempQueue queue = new ActiveMQTempQueue(id, i);
map.put(queue, value);
}
for (int i = 0; i < count; i++) {
ActiveMQTempQueue queue = new ActiveMQTempQueue(id, i);
map.remove(queue, value);
Set<?> set = map.get(queue);
assertTrue(set.isEmpty());
}
}
Aggregations