Package org.apache.qpid.server.model
Class AbstractSystemConfig<X extends SystemConfig<X>>
- java.lang.Object
-
- org.apache.qpid.server.model.AbstractConfiguredObject<X>
-
- org.apache.qpid.server.model.AbstractSystemConfig<X>
-
- All Implemented Interfaces:
EventLoggerProvider
,ConfiguredObject<X>
,ContextProvider
,DynamicModel
,ModelRoot
,PermissionedObject
,SystemConfig<X>
,TaskExecutorProvider
,PreferencesRoot
- Direct Known Subclasses:
JsonSystemConfigImpl
public abstract class AbstractSystemConfig<X extends SystemConfig<X>> extends AbstractConfiguredObject<X> implements SystemConfig<X>, DynamicModel
-
-
Nested Class Summary
-
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 inherited from class org.apache.qpid.server.model.AbstractConfiguredObject
SECURED_STRING_VALUE
-
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.SystemConfig
DEFAULT_INITIAL_CONFIG_LOCATION, DEFAULT_INITIAL_CONFIG_NAME, DEFAULT_POSIX_FILE_PERMISSIONS, DEFAULT_PREFERENCE_STORE_ATTRIBUTES, DEFAULT_QPID_WORK, DEFAULT_QPID_WORK_DIR, INITIAL_CONFIGURATION_LOCATION, INITIAL_SYSTEM_PROPERTIES_LOCATION, MANAGEMENT_MODE, MANAGEMENT_MODE_HTTP_PORT_OVERRIDE, MANAGEMENT_MODE_PASSWORD, MANAGEMENT_MODE_QUIESCE_VIRTUAL_HOSTS, MANAGEMENT_MODE_USER_NAME, POSIX_FILE_PERMISSIONS, PROPERTY_QPID_WORK, PROPERTY_STATUS_UPDATES, QPID_WORK_DIR, STARTUP_LOGGED_TO_SYSTEM_OUT
-
-
Constructor Summary
Constructors Constructor Description AbstractSystemConfig(TaskExecutor taskExecutor, EventLogger eventLogger, java.security.Principal systemPrincipal, java.util.Map<java.lang.String,java.lang.Object> attributes)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected com.google.common.util.concurrent.ListenableFuture<java.lang.Void>
activate()
PreferenceStore
createPreferenceStore()
protected abstract DurableConfigurationStore
createStoreObject()
protected com.google.common.util.concurrent.ListenableFuture<java.lang.Void>
doStop()
DurableConfigurationStore
getConfigurationStore()
Container<?>
getContainer()
<T extends Container<? extends T>>
TgetContainer(java.lang.Class<T> clazz)
java.lang.String
getDefaultContainerType()
static java.lang.String
getDefaultValue(java.lang.String attrName)
EventLogger
getEventLogger()
java.lang.String
getInitialConfigurationLocation()
java.lang.String
getInitialSystemPropertiesLocation()
int
getManagementModeHttpPortOverride()
java.lang.String
getManagementModePassword()
java.lang.Runnable
getOnContainerCloseTask()
java.lang.Runnable
getOnContainerResolveTask()
PreferenceStoreAttributes
getPreferenceStoreAttributes()
protected java.security.Principal
getSystemPrincipal()
boolean
isManagementMode()
boolean
isManagementModeQuiesceVirtualHosts()
boolean
isStartupLoggedToSystemOut()
protected void
logOperation(java.lang.String operation)
protected com.google.common.util.concurrent.ListenableFuture<java.lang.Void>
makeActive()
protected com.google.common.util.concurrent.ListenableFuture<java.lang.Void>
onClose()
protected void
onOpen()
protected boolean
rethrowRuntimeExceptionsOnOpen()
void
setOnContainerCloseTask(java.lang.Runnable onContainerCloseTask)
void
setOnContainerResolveTask(java.lang.Runnable onContainerResolveTask)
protected void
setState(State desiredState)
protected com.google.common.util.concurrent.ListenableFuture<java.lang.Void>
startQuiesced()
-
Methods inherited from class org.apache.qpid.server.model.AbstractConfiguredObject
addChangeListener, addChildAsync, addFutureCallback, applyToChildren, asObjectRecord, attainState, attributesAsString, attributeSet, authorise, authorise, authorise, authoriseCreateChild, awaitChildClassToAttainState, awaitChildClassToAttainState, beforeClose, beforeDelete, changeAttributes, 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, getAccessControl, 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, getSystemTaskControllerContext, getSystemTaskSubject, getSystemTaskSubject, getTaskExecutor, getType, getTypeClass, getUserPreferences, handleExceptionOnOpen, hasEncrypter, isDurable, isSystemProcess, isSystemSubject, logCreated, logDeleted, logRecovered, logUpdated, managesChildStorage, newToken, notifyStateChanged, onCreate, onDelete, onExceptionInOpen, onResolve, onValidate, open, openAsync, postResolve, postResolveChildren, postSetAttributes, registerWithParents, removeChangeListener, removeContextVariable, runTask, setAttributes, setAttributesAsync, setContextVariable, setEncrypter, setUserPreferences, start, startAsync, stop, toString, updateModel, validateChange, validateChildDelete, 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.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
-
-
-
-
Constructor Detail
-
AbstractSystemConfig
public AbstractSystemConfig(TaskExecutor taskExecutor, EventLogger eventLogger, java.security.Principal systemPrincipal, java.util.Map<java.lang.String,java.lang.Object> attributes)
-
-
Method Detail
-
setState
protected void setState(State desiredState)
- Overrides:
setState
in classAbstractConfiguredObject<X extends SystemConfig<X>>
-
getEventLogger
public EventLogger getEventLogger()
- Specified by:
getEventLogger
in interfaceEventLoggerProvider
- Specified by:
getEventLogger
in interfaceSystemConfig<X extends SystemConfig<X>>
-
onClose
protected com.google.common.util.concurrent.ListenableFuture<java.lang.Void> onClose()
- Overrides:
onClose
in classAbstractConfiguredObject<X extends SystemConfig<X>>
-
getContainer
public final <T extends Container<? extends T>> T getContainer(java.lang.Class<T> clazz)
- Specified by:
getContainer
in interfaceSystemConfig<X extends SystemConfig<X>>
-
getContainer
public final Container<?> getContainer()
- Specified by:
getContainer
in interfaceSystemConfig<X extends SystemConfig<X>>
-
onOpen
protected void onOpen()
- Overrides:
onOpen
in classAbstractConfiguredObject<X extends SystemConfig<X>>
-
doStop
protected com.google.common.util.concurrent.ListenableFuture<java.lang.Void> doStop()
-
activate
protected com.google.common.util.concurrent.ListenableFuture<java.lang.Void> activate()
-
makeActive
protected com.google.common.util.concurrent.ListenableFuture<java.lang.Void> makeActive()
-
startQuiesced
protected com.google.common.util.concurrent.ListenableFuture<java.lang.Void> startQuiesced()
-
rethrowRuntimeExceptionsOnOpen
protected final boolean rethrowRuntimeExceptionsOnOpen()
- Overrides:
rethrowRuntimeExceptionsOnOpen
in classAbstractConfiguredObject<X extends SystemConfig<X>>
-
createStoreObject
protected abstract DurableConfigurationStore createStoreObject()
-
getConfigurationStore
public DurableConfigurationStore getConfigurationStore()
- Specified by:
getConfigurationStore
in interfaceSystemConfig<X extends SystemConfig<X>>
-
getDefaultContainerType
public java.lang.String getDefaultContainerType()
- Specified by:
getDefaultContainerType
in interfaceDynamicModel
- Specified by:
getDefaultContainerType
in interfaceSystemConfig<X extends SystemConfig<X>>
-
isManagementMode
public boolean isManagementMode()
- Specified by:
isManagementMode
in interfaceSystemConfig<X extends SystemConfig<X>>
-
getManagementModeHttpPortOverride
public int getManagementModeHttpPortOverride()
- Specified by:
getManagementModeHttpPortOverride
in interfaceSystemConfig<X extends SystemConfig<X>>
-
isManagementModeQuiesceVirtualHosts
public boolean isManagementModeQuiesceVirtualHosts()
- Specified by:
isManagementModeQuiesceVirtualHosts
in interfaceSystemConfig<X extends SystemConfig<X>>
-
getManagementModePassword
public java.lang.String getManagementModePassword()
- Specified by:
getManagementModePassword
in interfaceSystemConfig<X extends SystemConfig<X>>
-
getInitialConfigurationLocation
public java.lang.String getInitialConfigurationLocation()
- Specified by:
getInitialConfigurationLocation
in interfaceSystemConfig<X extends SystemConfig<X>>
-
getInitialSystemPropertiesLocation
public java.lang.String getInitialSystemPropertiesLocation()
- Specified by:
getInitialSystemPropertiesLocation
in interfaceSystemConfig<X extends SystemConfig<X>>
-
isStartupLoggedToSystemOut
public boolean isStartupLoggedToSystemOut()
- Specified by:
isStartupLoggedToSystemOut
in interfaceSystemConfig<X extends SystemConfig<X>>
-
getPreferenceStoreAttributes
public PreferenceStoreAttributes getPreferenceStoreAttributes()
- Specified by:
getPreferenceStoreAttributes
in interfaceSystemConfig<X extends SystemConfig<X>>
-
createPreferenceStore
public PreferenceStore createPreferenceStore()
- Specified by:
createPreferenceStore
in interfacePreferencesRoot
-
getSystemPrincipal
protected final java.security.Principal getSystemPrincipal()
- Overrides:
getSystemPrincipal
in classAbstractConfiguredObject<X extends SystemConfig<X>>
-
getOnContainerResolveTask
public java.lang.Runnable getOnContainerResolveTask()
- Specified by:
getOnContainerResolveTask
in interfaceSystemConfig<X extends SystemConfig<X>>
-
setOnContainerResolveTask
public void setOnContainerResolveTask(java.lang.Runnable onContainerResolveTask)
- Specified by:
setOnContainerResolveTask
in interfaceSystemConfig<X extends SystemConfig<X>>
-
getOnContainerCloseTask
public java.lang.Runnable getOnContainerCloseTask()
- Specified by:
getOnContainerCloseTask
in interfaceSystemConfig<X extends SystemConfig<X>>
-
setOnContainerCloseTask
public void setOnContainerCloseTask(java.lang.Runnable onContainerCloseTask)
- Specified by:
setOnContainerCloseTask
in interfaceSystemConfig<X extends SystemConfig<X>>
-
logOperation
protected void logOperation(java.lang.String operation)
- Overrides:
logOperation
in classAbstractConfiguredObject<X extends SystemConfig<X>>
-
getDefaultValue
public static java.lang.String getDefaultValue(java.lang.String attrName)
-
-