1 18 package org.apache.activemq.broker.region.virtual; 19 20 import org.apache.activemq.broker.region.Destination; 21 22 import java.util.Collection ; 23 24 28 public abstract class CompositeDestination implements VirtualDestination { 29 30 private String name; 31 private Collection forwardTo; 32 private boolean forwardOnly = true; 33 private boolean copyMessage = true; 34 35 public Destination intercept(Destination destination) { 36 return new CompositeDestinationInterceptor(destination, getForwardTo(), isForwardOnly(), isCopyMessage()); 37 } 38 39 public String getName() { 40 return name; 41 } 42 43 46 public void setName(String name) { 47 this.name = name; 48 } 49 50 public Collection getForwardTo() { 51 return forwardTo; 52 } 53 54 57 public void setForwardTo(Collection forwardDestinations) { 58 this.forwardTo = forwardDestinations; 59 } 60 61 public boolean isForwardOnly() { 62 return forwardOnly; 63 } 64 65 70 public void setForwardOnly(boolean forwardOnly) { 71 this.forwardOnly = forwardOnly; 72 } 73 74 public boolean isCopyMessage() { 75 return copyMessage; 76 } 77 78 83 public void setCopyMessage(boolean copyMessage) { 84 this.copyMessage = copyMessage; 85 } 86 87 } 88 | Popular Tags |