Package org.apache.qpid.server.model
Class BrokerImpl
- java.lang.Object
-
- org.apache.qpid.server.model.AbstractConfiguredObject<X>
-
- org.apache.qpid.server.model.AbstractContainer<BrokerImpl>
-
- org.apache.qpid.server.model.BrokerImpl
-
- All Implemented Interfaces:
EventLoggerProvider
,Broker<BrokerImpl>
,ConfiguredObject<BrokerImpl>
,Container<BrokerImpl>
,ContextProvider
,PermissionedObject
,TaskExecutorProvider
,StatisticsGatherer
,UserPreferencesCreator
public class BrokerImpl extends AbstractContainer<BrokerImpl> implements Broker<BrokerImpl>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.qpid.server.model.AbstractContainer
AbstractContainer.ThreadStackContent
-
Nested classes/interfaces inherited from class org.apache.qpid.server.model.AbstractConfiguredObject
AbstractConfiguredObject.CallableWithArgument<V,A>, AbstractConfiguredObject.ChainedListenableFuture<V>, AbstractConfiguredObject.ChainedSettableFuture<V>, AbstractConfiguredObject.DuplicateIdException, AbstractConfiguredObject.DuplicateNameException
-
-
Field Summary
Fields Modifier and Type Field Description static String
MANAGEMENT_MODE_AUTHENTICATION
-
Fields inherited from class org.apache.qpid.server.model.AbstractContainer
_eventLogger, _houseKeepingTaskExecutor, _parent
-
Fields inherited from class org.apache.qpid.server.model.AbstractConfiguredObject
SECURED_STRING_VALUE
-
Fields inherited from interface org.apache.qpid.server.model.Broker
BROKER_DIRECT_BYTE_BUFFER_POOL_SIZE, BROKER_DIRECT_BYTE_BUFFER_POOL_SPARSITY_REALLOCATION_FRACTION, BROKER_FAIL_STARTUP_WITH_ERRORED_CHILD, BROKER_FAIL_STARTUP_WITH_ERRORED_CHILD_SCOPE, BROKER_FLOW_TO_DISK_THRESHOLD, BROKER_MESSAGE_COMPRESSION_ENABLED, BROKER_MSG_AUTH, BROKER_SHUTDOWN_TIMEOUT, BROKER_STATISTICS_REPORING_PERIOD, BROKER_TYPE, BUILD_VERSION, CHANNEL_FLOW_CONTROL_ENFORCEMENT_TIMEOUT, COMPACT_MEMORY_INTERVAL, COMPACT_MEMORY_THRESHOLD, DEFAULT_AMQP_PORT_NUMBER, DEFAULT_BROKER_DIRECT_BYTE_BUFFER_POOL_SIZE, DEFAULT_BROKER_DIRECT_BYTE_BUFFER_POOL_SPARSITY_REALLOCATION_FRACTION, DEFAULT_BROKER_FAIL_STARTUP_WITH_ERRORED_CHILD, DEFAULT_BROKER_FAIL_STARTUP_WITH_ERRORED_CHILD_SCOPE, DEFAULT_BROKER_HOUSEKEEPING_CHECK_PERIOD, DEFAULT_BROKER_MSG_AUTH, DEFAULT_BROKER_NAME, DEFAULT_BROKER_SHUTDOWN_TIMEOUT, DEFAULT_CHANNEL_FLOW_CONTROL_ENFORCEMENT_TIMEOUT, DEFAULT_COMPACT_MEMORY_INTERVAL, DEFAULT_COMPACT_MEMORY_THRESHOLD, DEFAULT_DOCUMENTATION_URL, DEFAULT_FILESYSTEM_MAX_USAGE_PERCENT, DEFAULT_FLOW_TO_DISK_THRESHOLD, DEFAULT_HOUSEKEEPING_THREAD_COUNT, DEFAULT_HTTP_PORT_NUMBER, DEFAULT_MESSAGE_COMPRESSION_ENABLED, DEFAULT_MESSAGE_COMPRESSION_THRESHOLD_SIZE, DEFAULT_NETWORK_BUFFER_SIZE, DEFAULT_SECURITY_TLS_CIPHER_SUITE_ALLOW_LIST, DEFAULT_SECURITY_TLS_CIPHER_SUITE_DENY_LIST, DEFAULT_SECURITY_TLS_PROTOCOL_ALLOW_LIST, DEFAULT_SECURITY_TLS_PROTOCOL_DENY_LIST, DEFAULT_SEND_QUEUE_DELETE_OK_REGARDLESS_CLIENT_VER_REGEXP, DEFAULT_STATISTICS_REPORTING_PERIOD, MESSAGE_COMPRESSION_THRESHOLD_SIZE, MINIMUM_NETWORK_BUFFER_SIZE, MODEL_VERSION, NETWORK_BUFFER_SIZE, OPERATING_SYSTEM, PLATFORM, PREFERENCE_STORE_ATTRIBUTES, PROCESS_PID, PRODUCT_VERSION, PROPERTY_DISABLED_FEATURES, QPID_AMQP_PORT, QPID_BROKER_HOUSEKEEPING_CHECK_PERIOD, QPID_DOCUMENTATION_URL, QPID_HTTP_PORT, SEND_QUEUE_DELETE_OK_REGARDLESS_CLIENT_VER_REGEXP, STATISTICS_REPORTING_PERIOD, STORE_FILESYSTEM_MAX_USAGE_PERCENT, STORE_PATH
-
Fields inherited from interface org.apache.qpid.server.model.ConfiguredObject
AWAIT_ATTAINMENT_TIMEOUT, CONTEXT, CREATED_BY, CREATED_TIME, DEFAULT_AWAIT_ATTAINMENT_TIMEOUT, DESCRIPTION, DESIRED_STATE, DURABLE, ID, LAST_UPDATED_BY, LAST_UPDATED_TIME, LIFETIME_POLICY, NAME, OVER_SIZED_ATTRIBUTE_ALTERNATIVE_TEXT, STATE, TYPE
-
Fields inherited from interface org.apache.qpid.server.model.Container
CONFIDENTIAL_CONFIGURATION_ENCRYPTION_PROVIDER
-
-
Constructor Summary
Constructors Constructor Description BrokerImpl(Map<String,Object> attributes, SystemConfig parent)
-
Method Summary
-
Methods inherited from class org.apache.qpid.server.model.AbstractContainer
findThreadStackTraces, getAvailableConfigurationEncrypters, getBuildVersion, getConfidentialConfigurationEncryptionProvider, getDirectMemoryTotalCapacity, getEventLogger, getHousekeepingThreadCount, getJvmArguments, getMaximumDirectMemorySize, getMaximumHeapMemorySize, getModelVersion, getNumberOfCores, getNumberOfLiveThreads, getNumberOfObjectsPendingFinalization, getOperatingSystem, getPlatform, getProcessPid, getProductVersion, getThreadStackTraces, getUsedDirectMemorySize, getUsedHeapMemorySize, performGC, scheduleHouseKeepingTask, scheduleTask, setEventLogger
-
Methods inherited from class org.apache.qpid.server.model.AbstractConfiguredObject
addChangeListener, addFutureCallback, applyToChildren, asObjectRecord, attainState, attributesAsString, attributeSet, authorise, authorise, authorise, authoriseCreateChild, awaitChildClassToAttainState, awaitChildClassToAttainState, beforeDelete, childAdded, childRemoved, close, closeAsync, closeChildren, create, createAsync, createChild, createChildAsync, decryptSecrets, delete, deleteAsync, deleteChildren, deleteNoChecks, doAfter, doAfter, doAfter, doAfter, doAfter, doAfter, doAfterAlways, doAfterAlways, doCreation, doOnConfigThread, doOpening, doResolution, doSync, doSync, doValidation, findConfiguredObject, forceUpdateAllSecureAttributes, getActualAttributes, getAncestor, getAttainedChildById, getAttainedChildByName, getAttribute, getAttributeNames, getCategoryClass, getChildById, getChildByName, getChildExecutor, getChildren, getContext, getContextKeys, getContextValue, getContextValue, getCreatedBy, getCreatedTime, getDescription, getDesiredState, getId, getLastOpenedTime, getLastUpdatedBy, getLastUpdatedTime, getLifetimePolicy, getModel, getName, getObjectFactory, getParent, getState, getStatistics, getStatistics, getSubjectWithAddedSystemRights, getSystemPrincipal, getSystemTaskControllerContext, getSystemTaskSubject, getSystemTaskSubject, getTaskExecutor, getType, getTypeClass, getUserPreferences, handleExceptionOnOpen, hasEncrypter, isDurable, isSystemProcess, isSystemSubject, logCreated, logDeleted, logRecovered, logUpdated, managesChildStorage, newToken, notifyStateChanged, onCreate, onDelete, onResolve, open, openAsync, postSetAttributes, registerWithParents, removeChangeListener, removeContextVariable, rethrowRuntimeExceptionsOnOpen, runTask, setAttributes, setAttributesAsync, setContextVariable, setEncrypter, setState, setUserPreferences, start, startAsync, stop, toString, updateModel, validateOnCreate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.qpid.server.model.Broker
findThreadStackTraces, getBuildVersion, getConfidentialConfigurationEncryptionProvider, getDirectMemoryTotalCapacity, getEventLogger, getHousekeepingThreadCount, getJvmArguments, getMaximumDirectMemorySize, getMaximumHeapMemorySize, getModelVersion, getNumberOfCores, getNumberOfLiveThreads, getNumberOfObjectsPendingFinalization, getOperatingSystem, getPlatform, getProcessPid, getProductVersion, getThreadStackTraces, getUsedDirectMemorySize, getUsedHeapMemorySize, performGC, scheduleHouseKeepingTask, scheduleTask, setEventLogger
-
Methods inherited from interface org.apache.qpid.server.model.ConfiguredObject
addChangeListener, asObjectRecord, authorise, authorise, authorise, close, closeAsync, createChild, createChildAsync, decryptSecrets, delete, deleteAsync, findConfiguredObject, getActualAttributes, getAttainedChildById, getAttainedChildByName, getAttribute, getAttributeNames, getCategoryClass, getChildById, getChildByName, getChildExecutor, getChildren, getContext, getCreatedBy, getCreatedTime, getDescription, getDesiredState, getId, getLastOpenedTime, getLastUpdatedBy, getLastUpdatedTime, getLifetimePolicy, getModel, getName, getObjectFactory, getParent, getState, getStatistics, getStatistics, getType, getTypeClass, getUserPreferences, hasEncrypter, isDurable, managesChildStorage, newToken, open, openAsync, removeChangeListener, removeContextVariable, setAttributes, setAttributesAsync, setContextVariable, setUserPreferences
-
Methods inherited from interface org.apache.qpid.server.model.ContextProvider
getContextKeys, getContextValue, getContextValue
-
Methods inherited from interface org.apache.qpid.server.model.TaskExecutorProvider
getTaskExecutor
-
-
-
-
Field Detail
-
MANAGEMENT_MODE_AUTHENTICATION
public static final String MANAGEMENT_MODE_AUTHENTICATION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BrokerImpl
public BrokerImpl(Map<String,Object> attributes, SystemConfig parent)
-
-
Method Detail
-
postResolve
protected void postResolve()
- Overrides:
postResolve
in classAbstractConfiguredObject<BrokerImpl>
-
postResolveChildren
protected void postResolveChildren()
- Overrides:
postResolveChildren
in classAbstractContainer<BrokerImpl>
-
onValidate
public void onValidate()
Description copied from class:AbstractConfiguredObject
Validation performed for configured object creation and opening.- Overrides:
onValidate
in classAbstractConfiguredObject<BrokerImpl>
-
validateChange
protected void validateChange(ConfiguredObject<?> proxyForValidation, Set<String> changedAttributes)
- Overrides:
validateChange
in classAbstractConfiguredObject<BrokerImpl>
-
changeAttributes
protected void changeAttributes(Map<String,Object> attributes)
- Overrides:
changeAttributes
in classAbstractConfiguredObject<BrokerImpl>
-
validateChildDelete
protected void validateChildDelete(ConfiguredObject<?> child)
- Overrides:
validateChildDelete
in classAbstractConfiguredObject<BrokerImpl>
-
initiateShutdown
public void initiateShutdown()
- Specified by:
initiateShutdown
in interfaceBroker<BrokerImpl>
-
extractConfig
public Map<String,Object> extractConfig(boolean includeSecureAttributes)
- Specified by:
extractConfig
in interfaceBroker<BrokerImpl>
-
getShutdownTimeout
public int getShutdownTimeout()
- Specified by:
getShutdownTimeout
in interfaceBroker<BrokerImpl>
-
getStatisticsReportingPeriod
public int getStatisticsReportingPeriod()
- Specified by:
getStatisticsReportingPeriod
in interfaceBroker<BrokerImpl>
-
isMessageCompressionEnabled
public boolean isMessageCompressionEnabled()
- Specified by:
isMessageCompressionEnabled
in interfaceBroker<BrokerImpl>
-
getVirtualHostNodes
public Collection<VirtualHostNode<?>> getVirtualHostNodes()
- Specified by:
getVirtualHostNodes
in interfaceBroker<BrokerImpl>
-
getPorts
public Collection<Port<?>> getPorts()
- Specified by:
getPorts
in interfaceBroker<BrokerImpl>
-
getAuthenticationProviders
public Collection<AuthenticationProvider<?>> getAuthenticationProviders()
- Specified by:
getAuthenticationProviders
in interfaceBroker<BrokerImpl>
-
assignTargetSizes
public void assignTargetSizes()
- Specified by:
assignTargetSizes
in interfaceBroker<BrokerImpl>
-
onOpen
protected void onOpen()
- Overrides:
onOpen
in classAbstractConfiguredObject<BrokerImpl>
-
getSystemAddressSpace
public NamedAddressSpace getSystemAddressSpace(String name)
- Specified by:
getSystemAddressSpace
in interfaceBroker<BrokerImpl>
-
getGroupProviders
public Collection<GroupProvider<?>> getGroupProviders()
- Specified by:
getGroupProviders
in interfaceBroker<BrokerImpl>
-
addChildAsync
protected <C extends ConfiguredObject> com.google.common.util.concurrent.ListenableFuture<C> addChildAsync(Class<C> childClass, Map<String,Object> attributes)
- Overrides:
addChildAsync
in classAbstractConfiguredObject<BrokerImpl>
-
beforeClose
protected com.google.common.util.concurrent.ListenableFuture<Void> beforeClose()
- Overrides:
beforeClose
in classAbstractConfiguredObject<BrokerImpl>
-
onClose
protected com.google.common.util.concurrent.ListenableFuture<Void> onClose()
- Overrides:
onClose
in classAbstractConfiguredObject<BrokerImpl>
-
createUserPreferences
public UserPreferences createUserPreferences(ConfiguredObject<?> object)
- Specified by:
createUserPreferences
in interfaceUserPreferencesCreator
-
getAccessControl
public AccessControl getAccessControl()
- Overrides:
getAccessControl
in classAbstractConfiguredObject<BrokerImpl>
-
findVirtualHostByName
public VirtualHost<?> findVirtualHostByName(String name)
- Specified by:
findVirtualHostByName
in interfaceBroker<BrokerImpl>
-
findDefautVirtualHostNode
public VirtualHostNode findDefautVirtualHostNode()
- Specified by:
findDefautVirtualHostNode
in interfaceBroker<BrokerImpl>
-
getKeyStores
public Collection<KeyStore<?>> getKeyStores()
- Specified by:
getKeyStores
in interfaceBroker<BrokerImpl>
-
getTrustStores
public Collection<TrustStore<?>> getTrustStores()
- Specified by:
getTrustStores
in interfaceBroker<BrokerImpl>
-
isManagementMode
public boolean isManagementMode()
- Specified by:
isManagementMode
in interfaceBroker<BrokerImpl>
-
getAccessControlProviders
public Collection<AccessControlProvider<?>> getAccessControlProviders()
- Specified by:
getAccessControlProviders
in interfaceBroker<BrokerImpl>
-
onExceptionInOpen
protected void onExceptionInOpen(RuntimeException e)
Description copied from class:AbstractConfiguredObject
Callback method to perform ConfiguredObject specific exception handling on exception in open.The method is not expected to throw any runtime exception.
- Overrides:
onExceptionInOpen
in classAbstractConfiguredObject<BrokerImpl>
- Parameters:
e
- open exception
-
logOperation
protected void logOperation(String operation)
- Overrides:
logOperation
in classAbstractConfiguredObject<BrokerImpl>
-
registerMessageDelivered
public void registerMessageDelivered(long messageSize)
Description copied from interface:StatisticsGatherer
This method is responsible for registering the delivery of a message with the counters.- Specified by:
registerMessageDelivered
in interfaceStatisticsGatherer
- Parameters:
messageSize
- the size in bytes of the delivered message
-
registerTransactedMessageReceived
public void registerTransactedMessageReceived()
- Specified by:
registerTransactedMessageReceived
in interfaceStatisticsGatherer
-
registerTransactedMessageDelivered
public void registerTransactedMessageDelivered()
- Specified by:
registerTransactedMessageDelivered
in interfaceStatisticsGatherer
-
registerMessageReceived
public void registerMessageReceived(long messageSize)
Description copied from interface:StatisticsGatherer
This method is responsible for registering the receipt of a message with the counters.- Specified by:
registerMessageReceived
in interfaceStatisticsGatherer
- Parameters:
messageSize
- the size in bytes of the delivered message
-
getFlowToDiskThreshold
public long getFlowToDiskThreshold()
- Specified by:
getFlowToDiskThreshold
in interfaceBroker<BrokerImpl>
-
getNumberOfBuffersInUse
public long getNumberOfBuffersInUse()
- Specified by:
getNumberOfBuffersInUse
in interfaceBroker<BrokerImpl>
-
getNumberOfBuffersInPool
public long getNumberOfBuffersInPool()
- Specified by:
getNumberOfBuffersInPool
in interfaceBroker<BrokerImpl>
-
getInboundMessageSizeHighWatermark
public long getInboundMessageSizeHighWatermark()
- Specified by:
getInboundMessageSizeHighWatermark
in interfaceBroker<BrokerImpl>
-
getMessagesIn
public long getMessagesIn()
Description copied from interface:StatisticsGatherer
Returns a number of received messages- Specified by:
getMessagesIn
in interfaceBroker<BrokerImpl>
- Specified by:
getMessagesIn
in interfaceStatisticsGatherer
- Returns:
- the number of received messages
-
getBytesIn
public long getBytesIn()
Description copied from interface:StatisticsGatherer
Returns a number of received bytes- Specified by:
getBytesIn
in interfaceBroker<BrokerImpl>
- Specified by:
getBytesIn
in interfaceStatisticsGatherer
- Returns:
- the number of received bytes
-
getMessagesOut
public long getMessagesOut()
Description copied from interface:StatisticsGatherer
Returns a number of delivered messages- Specified by:
getMessagesOut
in interfaceBroker<BrokerImpl>
- Specified by:
getMessagesOut
in interfaceStatisticsGatherer
- Returns:
- the number of delivered messages
-
getBytesOut
public long getBytesOut()
Description copied from interface:StatisticsGatherer
Returns a number of delivered bytes- Specified by:
getBytesOut
in interfaceBroker<BrokerImpl>
- Specified by:
getBytesOut
in interfaceStatisticsGatherer
- Returns:
- the number of delivered bytes
-
getTransactedMessagesIn
public long getTransactedMessagesIn()
- Specified by:
getTransactedMessagesIn
in interfaceBroker<BrokerImpl>
-
getTransactedMessagesOut
public long getTransactedMessagesOut()
- Specified by:
getTransactedMessagesOut
in interfaceBroker<BrokerImpl>
-
isVirtualHostPropertiesNodeEnabled
public boolean isVirtualHostPropertiesNodeEnabled()
- Specified by:
isVirtualHostPropertiesNodeEnabled
in interfaceBroker<BrokerImpl>
-
getManagementModeAuthenticationProvider
public AuthenticationProvider<?> getManagementModeAuthenticationProvider()
- Specified by:
getManagementModeAuthenticationProvider
in interfaceBroker<BrokerImpl>
- Specified by:
getManagementModeAuthenticationProvider
in interfaceContainer<BrokerImpl>
-
getNetworkBufferSize
public int getNetworkBufferSize()
- Specified by:
getNetworkBufferSize
in interfaceBroker<BrokerImpl>
- Specified by:
getNetworkBufferSize
in interfaceContainer<BrokerImpl>
-
getDocumentationUrl
public String getDocumentationUrl()
- Specified by:
getDocumentationUrl
in interfaceBroker<BrokerImpl>
-
resetStatistics
public void resetStatistics()
- Specified by:
resetStatistics
in interfaceBroker<BrokerImpl>
-
restart
public void restart()
- Specified by:
restart
in interfaceBroker<BrokerImpl>
-
getUser
public Principal getUser()
- Specified by:
getUser
in interfaceBroker<BrokerImpl>
-
getConnectionMetaData
public SocketConnectionMetaData getConnectionMetaData()
- Specified by:
getConnectionMetaData
in interfaceBroker<BrokerImpl>
-
getGroups
public Set<Principal> getGroups()
- Specified by:
getGroups
in interfaceBroker<BrokerImpl>
-
purgeUser
public void purgeUser(AuthenticationProvider<?> origin, String username)
- Specified by:
purgeUser
in interfaceBroker<BrokerImpl>
-
getCompactMemoryThreshold
public long getCompactMemoryThreshold()
- Specified by:
getCompactMemoryThreshold
in interfaceBroker<BrokerImpl>
-
getCompactMemoryInterval
public long getCompactMemoryInterval()
- Specified by:
getCompactMemoryInterval
in interfaceBroker<BrokerImpl>
-
getSparsityFraction
public double getSparsityFraction()
- Specified by:
getSparsityFraction
in interfaceBroker<BrokerImpl>
-
getHousekeepingCheckPeriod
public long getHousekeepingCheckPeriod()
- Specified by:
getHousekeepingCheckPeriod
in interfaceBroker<BrokerImpl>
-
compactMemory
public void compactMemory()
- Specified by:
compactMemory
in interfaceBroker<BrokerImpl>
-
-