Search in sources :

Example 1 with ConnectionValidator

use of org.apache.qpid.server.plugin.ConnectionValidator in project qpid-broker-j by apache.

the class AbstractVirtualHost method onOpen.

@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();
    openConnectionLimiter();
}
Also used : QpidServiceLoader(org.apache.qpid.server.plugin.QpidServiceLoader) PreferencesRoot(org.apache.qpid.server.store.preferences.PreferencesRoot) AtomicLong(java.util.concurrent.atomic.AtomicLong) MessageStoreLogSubject(org.apache.qpid.server.logging.subjects.MessageStoreLogSubject) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) ConnectionValidator(org.apache.qpid.server.plugin.ConnectionValidator) VirtualHostNode(org.apache.qpid.server.model.VirtualHostNode)

Aggregations

AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)1 AtomicLong (java.util.concurrent.atomic.AtomicLong)1 MessageStoreLogSubject (org.apache.qpid.server.logging.subjects.MessageStoreLogSubject)1 VirtualHostNode (org.apache.qpid.server.model.VirtualHostNode)1 ConnectionValidator (org.apache.qpid.server.plugin.ConnectionValidator)1 QpidServiceLoader (org.apache.qpid.server.plugin.QpidServiceLoader)1 PreferencesRoot (org.apache.qpid.server.store.preferences.PreferencesRoot)1