@Override public void onChange() { AddressSettings settings = addressSettingsRepository.getMatch(address.toString()); configureExpiry(settings); configureSlowConsumerReaper(settings); } }
public Set<Role> getSecurity(final String addressMatch) { return server.getSecurityRepository().getMatch(addressMatch); }
public AddressSettings getAddressSettings(final String address) { return server.getAddressSettingsRepository().getMatch(address); }
protected PagingStore newStore(final SimpleString address) { return pagingStoreFactory.newStore(address, addressSettingsRepository.getMatch(address.toString())); }
public void reaplySettings() { for (PagingStore store : stores.values()) { AddressSettings settings = this.addressSettingsRepository.getMatch(store.getAddress().toString()); store.applySetting(settings); } }
private void reaplySettings() { for (PagingStore store : stores.values()) { AddressSettings settings = this.addressSettingsRepository.getMatch(store.getAddress().toString()); store.applySetting(settings); } }
private void sendToDeadLetterAddress(final MessageReference ref) throws Exception { sendToDeadLetterAddress(ref, addressSettingsRepository.getMatch(address.toString()).getDeadLetterAddress()); }
private void applyExpiryDelay(ServerMessage message, SimpleString address) { long expirationOverride = addressSettingsRepository.getMatch(address.toString()).getExpiryDelay(); // A -1 <expiry-delay> means don't do anything if (expirationOverride >= 0) { // only override the exiration on messages where the expiration hasn't been set by the user if (message.getExpiration() == 0) { message.setExpiration(System.currentTimeMillis() + expirationOverride); } } }
private void sendToDeadLetterAddress(final MessageReference ref) throws Exception { sendToDeadLetterAddress(ref, addressSettingsRepository.getMatch(address.toString()).getDeadLetterAddress()); }
public void setDeadLetterAddress(final String deadLetterAddress) throws Exception { checkStarted(); clearIO(); try { AddressSettings addressSettings = addressSettingsRepository.getMatch(address); if (deadLetterAddress != null) { addressSettings.setDeadLetterAddress(new SimpleString(deadLetterAddress)); } } finally { blockOnIO(); } }
public String getDeadLetterAddress() { checkStarted(); clearIO(); try { AddressSettings addressSettings = addressSettingsRepository.getMatch(address); if (addressSettings != null && addressSettings.getDeadLetterAddress() != null) { return addressSettings.getDeadLetterAddress().toString(); } return null; } finally { blockOnIO(); } }
private void expire(final Transaction tx, final MessageReference ref) throws Exception { SimpleString expiryAddress = addressSettingsRepository.getMatch(address.toString()).getExpiryAddress(); if (expiryAddress != null) { Bindings bindingList = postOffice.getBindingsForAddress(expiryAddress); if (bindingList.getBindings().isEmpty()) { HornetQServerLogger.LOGGER.errorExpiringReferencesNoBindings(expiryAddress); } else { move(expiryAddress, tx, ref, true, true); } } else { HornetQServerLogger.LOGGER.errorExpiringReferencesNoQueue(name); acknowledge(tx, ref); } }
public void setExpiryAddress(final String expiryAddress) throws Exception { checkStarted(); clearIO(); try { AddressSettings addressSettings = addressSettingsRepository.getMatch(address); SimpleString sExpiryAddress = new SimpleString(expiryAddress); if (expiryAddress != null) { addressSettings.setExpiryAddress(sExpiryAddress); } queue.setExpiryAddress(sExpiryAddress); } finally { blockOnIO(); } }
public String getDeadLetterAddress() { checkStarted(); clearIO(); try { AddressSettings addressSettings = addressSettingsRepository.getMatch(address); if (addressSettings != null && addressSettings.getDeadLetterAddress() != null) { return addressSettings.getDeadLetterAddress().toString(); } else { return null; } } finally { blockOnIO(); } }
public String getRolesAsJSON() throws Exception { clearIO(); try { JSONArray json = new JSONArray(); Set<Role> roles = securityRepository.getMatch(address.toString()); for (Role role : roles) { json.put(new JSONObject(role)); } return json.toString(); } finally { blockOnIO(); } }
public String getRolesAsJSON() throws Exception { clearIO(); try { JSONArray json = new JSONArray(); Set<Role> roles = securityRepository.getMatch(address.toString()); for (Role role : roles) { json.put(new JSONObject(role)); } return json.toString(); } finally { blockOnIO(); } }
public void setExpiryAddress(final String expiryAddress) throws Exception { checkStarted(); clearIO(); try { AddressSettings addressSettings = addressSettingsRepository.getMatch(address); if (addressSettings != null && expiryAddress != null) { addressSettings = new AddressSettings(addressSettings); addressSettings.setExpiryAddress(SimpleString.toSimpleString(expiryAddress)); addressSettingsRepository.addMatch(address, addressSettings); } } finally { blockOnIO(); } }
public void setDeadLetterAddress(final String deadLetterAddress) throws Exception { checkStarted(); clearIO(); try { AddressSettings addressSettings = addressSettingsRepository.getMatch(address); if (addressSettings != null && deadLetterAddress != null) { addressSettings = new AddressSettings(addressSettings); addressSettings.setDeadLetterAddress(SimpleString.toSimpleString(deadLetterAddress)); addressSettingsRepository.addMatch(address, addressSettings); } } finally { blockOnIO(); } }
public String getRolesAsJSON(final String addressMatch) throws Exception { checkStarted(); clearIO(); try { JSONArray json = new JSONArray(); Set<Role> roles = server.getSecurityRepository().getMatch(addressMatch); for (Role role : roles) { json.put(new JSONObject(role)); } return json.toString(); } finally { blockOnIO(); } }
public String getRolesAsJSON(final String addressMatch) throws Exception { checkStarted(); clearIO(); try { JSONArray json = new JSONArray(); Set<Role> roles = server.getSecurityRepository().getMatch(addressMatch); for (Role role : roles) { json.put(new JSONObject(role)); } return json.toString(); } finally { blockOnIO(); } }