public ProducerInfo copy() { ProducerInfo info = new ProducerInfo(); copy(info); return info; }
/** * A producer may register to send to multiple destinations via a composite * destination. */ public void addProducer(ConnectionContext context, ProducerInfo info) throws Exception { // The destination may be null. ActiveMQDestination destination = info.getDestination(); if (destination != null && destination.isComposite()) { ActiveMQDestination[] destinations = destination.getCompositeDestinations(); for (int i = 0; i < destinations.length; i++) { ProducerInfo copy = info.copy(); copy.setDestination(destinations[i]); next.addProducer(context, copy); } } else { next.addProducer(context, info); } }
/** * A producer may de-register from sending to multiple destinations via a * composite destination. */ public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception { // The destination may be null. ActiveMQDestination destination = info.getDestination(); if (destination != null && destination.isComposite()) { ActiveMQDestination[] destinations = destination.getCompositeDestinations(); for (int i = 0; i < destinations.length; i++) { ProducerInfo copy = info.copy(); copy.setDestination(destinations[i]); next.removeProducer(context, copy); } } else { next.removeProducer(context, info); } }
public ProducerInfo copy() { ProducerInfo info = new ProducerInfo(); copy(info); return info; }
public ProducerInfo copy() { ProducerInfo info = new ProducerInfo(); copy(info); return info; }
public ProducerInfo copy() { ProducerInfo info = new ProducerInfo(); copy(info); return info; }
public ProducerInfo copy() { ProducerInfo info = new ProducerInfo(); copy(info); return info; }
@Override public Response processAddProducer(ProducerInfo producerInfo) throws Exception { ProducerInfo copy = producerInfo.copy(); SessionId originalSessionId = producerInfo.getProducerId().getParentId(); SessionId newSessionId = sessionIdMap.get(originalSessionId); if (newSessionId == null) { newSessionId = new SessionId(getMultiplexerConnectionId(), multiplexer.getNextSessionId()); sessionIdMap.put(originalSessionId, newSessionId); } ProducerId producerId = new ProducerId(newSessionId, multiplexer.getNextProducerId()); copy.setProducerId(producerId); producerIdMap.put(producerInfo.getProducerId(), producerId); multiplexer.sendOutAll(this, copy); multiplexerConnectionStateRegister.addProducer(copy); destinationRegister.registerProducer(producerInfo.getDestination()); return null; }
@Override public Response processAddProducer(ProducerInfo producerInfo) throws Exception { ProducerInfo copy = producerInfo.copy(); SessionId originalSessionId = producerInfo.getProducerId().getParentId(); SessionId newSessionId = sessionIdMap.get(originalSessionId); if (newSessionId == null) { newSessionId = new SessionId(getMultiplexerConnectionId(), multiplexer.getNextSessionId()); sessionIdMap.put(originalSessionId, newSessionId); } ProducerId producerId = new ProducerId(newSessionId, multiplexer.getNextProducerId()); copy.setProducerId(producerId); producerIdMap.put(producerInfo.getProducerId(), producerId); multiplexer.sendOutAll(this, copy); multiplexerConnectionStateRegister.addProducer(copy); destinationRegister.registerProducer(producerInfo.getDestination()); return null; }
/** * A producer may register to send to multiple destinations via a composite * destination. */ public void addProducer(ConnectionContext context, ProducerInfo info) throws Exception { // The destination may be null. ActiveMQDestination destination = info.getDestination(); if (destination != null && destination.isComposite()) { ActiveMQDestination[] destinations = destination.getCompositeDestinations(); for (int i = 0; i < destinations.length; i++) { ProducerInfo copy = info.copy(); copy.setDestination(destinations[i]); next.addProducer(context, copy); } } else { next.addProducer(context, info); } }
/** * A producer may de-register from sending to multiple destinations via a * composite destination. */ public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception { // The destination may be null. ActiveMQDestination destination = info.getDestination(); if (destination != null && destination.isComposite()) { ActiveMQDestination[] destinations = destination.getCompositeDestinations(); for (int i = 0; i < destinations.length; i++) { ProducerInfo copy = info.copy(); copy.setDestination(destinations[i]); next.removeProducer(context, copy); } } else { next.removeProducer(context, info); } }
/** * A producer may de-register from sending to multiple destinations via a * composite destination. */ public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception { // The destination may be null. ActiveMQDestination destination = info.getDestination(); if (destination != null && destination.isComposite()) { ActiveMQDestination[] destinations = destination.getCompositeDestinations(); for (int i = 0; i < destinations.length; i++) { ProducerInfo copy = info.copy(); copy.setDestination(destinations[i]); next.removeProducer(context, copy); } } else { next.removeProducer(context, info); } }
/** * A producer may register to send to multiple destinations via a composite * destination. */ public void addProducer(ConnectionContext context, ProducerInfo info) throws Exception { // The destination may be null. ActiveMQDestination destination = info.getDestination(); if (destination != null && destination.isComposite()) { ActiveMQDestination[] destinations = destination.getCompositeDestinations(); for (int i = 0; i < destinations.length; i++) { ProducerInfo copy = info.copy(); copy.setDestination(destinations[i]); next.addProducer(context, copy); } } else { next.addProducer(context, info); } }
/** * A producer may register to send to multiple destinations via a composite * destination. */ public void addProducer(ConnectionContext context, ProducerInfo info) throws Exception { // The destination may be null. ActiveMQDestination destination = info.getDestination(); if (destination != null && destination.isComposite()) { ActiveMQDestination[] destinations = destination.getCompositeDestinations(); for (int i = 0; i < destinations.length; i++) { ProducerInfo copy = info.copy(); copy.setDestination(destinations[i]); next.addProducer(context, copy); } } else { next.addProducer(context, info); } }
/** * A producer may de-register from sending to multiple destinations via a * composite destination. */ public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception { // The destination may be null. ActiveMQDestination destination = info.getDestination(); if (destination != null && destination.isComposite()) { ActiveMQDestination[] destinations = destination.getCompositeDestinations(); for (int i = 0; i < destinations.length; i++) { ProducerInfo copy = info.copy(); copy.setDestination(destinations[i]); next.removeProducer(context, copy); } } else { next.removeProducer(context, info); } }
/** * A producer may register to send to multiple destinations via a composite * destination. */ public void addProducer(ConnectionContext context, ProducerInfo info) throws Exception { // The destination may be null. ActiveMQDestination destination = info.getDestination(); if (destination != null && destination.isComposite()) { ActiveMQDestination[] destinations = destination.getCompositeDestinations(); for (int i = 0; i < destinations.length; i++) { ProducerInfo copy = info.copy(); copy.setDestination(destinations[i]); next.addProducer(context, copy); } } else { next.addProducer(context, info); } }
/** * A producer may de-register from sending to multiple destinations via a * composite destination. */ public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception { // The destination may be null. ActiveMQDestination destination = info.getDestination(); if (destination != null && destination.isComposite()) { ActiveMQDestination[] destinations = destination.getCompositeDestinations(); for (int i = 0; i < destinations.length; i++) { ProducerInfo copy = info.copy(); copy.setDestination(destinations[i]); next.removeProducer(context, copy); } } else { next.removeProducer(context, info); } }