@Override public int compareTo(Object that) { if (that instanceof FilteredKahaDBPersistenceAdapter) { return this.destination.compareTo(((FilteredKahaDBPersistenceAdapter) that).destination); } return super.compareTo(that); }
/** * A helper method to allow the destination map to be populated from a * dependency injection framework such as Spring */ @SuppressWarnings({"rawtypes"}) protected void setEntries(List<DestinationMapEntry> entries) { for (Object element : entries) { Class<? extends DestinationMapEntry> type = getEntryClass(); if (type.isInstance(element)) { DestinationMapEntry entry = (DestinationMapEntry) element; put(entry.getDestination(), entry.getValue()); } else { throw new IllegalArgumentException("Each entry must be an instance of type: " + type.getName() + " but was: " + element); } } }
/** * A helper method to set the destination from a configuration file */ public void setTopic(String name) { setDestination(new ActiveMQTopic(name)); }
@SuppressWarnings("rawtypes") //Used to filter out any child/unmatching entries private boolean isMatchOrParent(final ActiveMQDestination destination, final DestinationMapEntry entry) { //If destination not set then do not filter out if (entry.getDestination() == null) { return true; } final DestinationFilter filter = DestinationFilter.parseFilter(entry.getDestination()); return destination.equals(entry.getDestination()) || filter.matches(destination); }
public void afterPropertiesSet() throws Exception { super.afterPropertiesSet(); if (adminRoles != null) { setAdminACLs(parseACLs(adminRoles)); } if (writeRoles != null) { setWriteACLs(parseACLs(writeRoles)); } if (readRoles != null) { setReadACLs(parseACLs(readRoles)); } } }
@SuppressWarnings("rawtypes") //Used to filter out any child/unmatching entries private boolean isMatchOrParent(final ActiveMQDestination destination, final DestinationMapEntry entry) { //If destination not set then do not filter out if (entry.getDestination() == null) { return true; } final DestinationFilter filter = DestinationFilter.parseFilter(entry.getDestination()); return destination.equals(entry.getDestination()) || filter.matches(destination); }
/** * A helper method to set the destination from a configuration file */ public void setQueue(String name) { setDestination(new ActiveMQQueue(name)); }
/** * A helper method to allow the destination map to be populated from a * dependency injection framework such as Spring */ @SuppressWarnings({"rawtypes"}) protected void setEntries(List<DestinationMapEntry> entries) { for (Object element : entries) { Class<? extends DestinationMapEntry> type = getEntryClass(); if (type.isInstance(element)) { DestinationMapEntry entry = (DestinationMapEntry) element; put(entry.getDestination(), entry.getValue()); } else { throw new IllegalArgumentException("Each entry must be an instance of type: " + type.getName() + " but was: " + element); } } }
@Override public int compare(DestinationMapEntry entry1, DestinationMapEntry entry2) { return destination.equals(entry1.destination) ? -1 : (destination.equals(entry2.destination) ? 1 : entry1.compareTo(entry2)); } };
@SuppressWarnings("rawtypes") //Used to filter out any child/unmatching entries private boolean isMatchOrParent(final ActiveMQDestination destination, final DestinationMapEntry entry) { //If destination not set then do not filter out if (entry.getDestination() == null) { return true; } final DestinationFilter filter = DestinationFilter.parseFilter(entry.getDestination()); return destination.equals(entry.getDestination()) || filter.matches(destination); }
public void setTempTopic(boolean flag){ setDestination(new ActiveMQTempTopic(">")); }
/** * A helper method to allow the destination map to be populated from a * dependency injection framework such as Spring */ @SuppressWarnings({"rawtypes"}) protected void setEntries(List<DestinationMapEntry> entries) { for (Object element : entries) { Class<? extends DestinationMapEntry> type = getEntryClass(); if (type.isInstance(element)) { DestinationMapEntry entry = (DestinationMapEntry) element; put(entry.getDestination(), entry.getValue()); } else { throw new IllegalArgumentException("Each entry must be an instance of type: " + type.getName() + " but was: " + element); } } }
@Override public int compareTo(Object that) { if (that instanceof FilteredKahaDBPersistenceAdapter) { return this.destination.compareTo(((FilteredKahaDBPersistenceAdapter) that).destination); } return super.compareTo(that); }
@SuppressWarnings("rawtypes") //Used to filter out any child/unmatching entries private boolean isMatchOrParent(final ActiveMQDestination destination, final DestinationMapEntry entry) { //If destination not set then do not filter out if (entry.getDestination() == null) { return true; } final DestinationFilter filter = DestinationFilter.parseFilter(entry.getDestination()); return destination.equals(entry.getDestination()) || filter.matches(destination); }
public void setTempQueue(boolean flag){ setDestination(new ActiveMQTempQueue(">")); }
/** * A helper method to allow the destination map to be populated from a * dependency injection framework such as Spring */ @SuppressWarnings({"rawtypes"}) protected void setEntries(List<DestinationMapEntry> entries) { for (Object element : entries) { Class<? extends DestinationMapEntry> type = getEntryClass(); if (type.isInstance(element)) { DestinationMapEntry entry = (DestinationMapEntry) element; put(entry.getDestination(), entry.getValue()); } else { throw new IllegalArgumentException("Each entry must be an instance of type: " + type.getName() + " but was: " + element); } } }
@Override public int compareTo(Object that) { if (that instanceof FilteredKahaDBPersistenceAdapter) { return this.destination.compareTo(((FilteredKahaDBPersistenceAdapter) that).destination); } return super.compareTo(that); }
/** * A helper method to set the destination from a configuration file */ public void setTopic(String name) { setDestination(new ActiveMQTopic(name)); }
/** * A helper method to allow the destination map to be populated from a * dependency injection framework such as Spring */ protected void setEntries(List entries) { for (Iterator iter = entries.iterator(); iter.hasNext();) { Object element = (Object)iter.next(); Class type = getEntryClass(); if (type.isInstance(element)) { DestinationMapEntry entry = (DestinationMapEntry)element; put(entry.getDestination(), entry.getValue()); } else { throw new IllegalArgumentException("Each entry must be an instance of type: " + type.getName() + " but was: " + element); } } }
@Override public int compareTo(Object that) { if (that instanceof FilteredKahaDBPersistenceAdapter) { return this.destination.compareTo(((FilteredKahaDBPersistenceAdapter) that).destination); } return super.compareTo(that); }