1 18 package org.apache.activemq.broker.region.policy; 19 20 import org.apache.activemq.command.ActiveMQDestination; 21 import org.apache.activemq.filter.DestinationMap; 22 23 import java.util.List ; 24 25 34 public class PolicyMap extends DestinationMap { 35 36 private PolicyEntry defaultEntry; 37 38 public PolicyEntry getEntryFor(ActiveMQDestination destination) { 39 PolicyEntry answer = (PolicyEntry) chooseValue(destination); 40 if (answer == null) { 41 answer = getDefaultEntry(); 42 } 43 return answer; 44 } 45 46 51 public void setPolicyEntries(List entries) { 52 super.setEntries(entries); 53 } 54 55 public PolicyEntry getDefaultEntry() { 56 return defaultEntry; 57 } 58 59 public void setDefaultEntry(PolicyEntry defaultEntry) { 60 this.defaultEntry = defaultEntry; 61 } 62 63 protected Class getEntryClass() { 64 return PolicyEntry.class; 65 } 66 } 67 | Popular Tags |