@Override public boolean authoriseCreateConnection(final AMQPConnection<?> connection) { authorise(Operation.PERFORM_ACTION("connect")); for(ConnectionValidator validator : _connectionValidators) { if(!validator.validateConnectionCreation(connection, this)) { return false; } } return true; }
@Override protected void onOpen() { super.onOpen(); registerSystemNodes(); _messageStore = createMessageStore(); _messageStoreLogSubject = new MessageStoreLogSubject(getName(), _messageStore.getClass().getSimpleName()); _messageStore.addEventListener(this, Event.PERSISTENT_MESSAGE_SIZE_OVERFULL); _messageStore.addEventListener(this, Event.PERSISTENT_MESSAGE_SIZE_UNDERFULL); _fileSystemMaxUsagePercent = getContextValue(Integer.class, Broker.STORE_FILESYSTEM_MAX_USAGE_PERCENT); _flowToDiskCheckPeriod = getContextValue(Long.class, FLOW_TO_DISK_CHECK_PERIOD); _isDiscardGlobalSharedSubscriptionLinksOnDetach = getContextValue(Boolean.class, DISCARD_GLOBAL_SHARED_SUBSCRIPTION_LINKS_ON_DETACH); QpidServiceLoader serviceLoader = new QpidServiceLoader(); for(ConnectionValidator validator : serviceLoader.instancesOf(ConnectionValidator.class)) { if((_enabledConnectionValidators.isEmpty() && (_disabledConnectionValidators.isEmpty()) || !_disabledConnectionValidators.contains(validator.getType())) || _enabledConnectionValidators.contains(validator.getType())) { _connectionValidators.add(validator); } } PreferencesRoot preferencesRoot = (VirtualHostNode) getParent(); _preferenceStore = preferencesRoot.createPreferenceStore(); _linkRegistry = createLinkRegistry(); createHousekeepingExecutor(); }