Class AbstractConfigurationPersister
- java.lang.Object
-
- org.jboss.as.controller.persistence.AbstractConfigurationPersister
-
- All Implemented Interfaces:
ConfigurationPersister,ExtensibleConfigurationPersister,SubsystemXmlWriterRegistry
- Direct Known Subclasses:
NullConfigurationPersister,XmlConfigurationPersister
public abstract class AbstractConfigurationPersister extends Object implements ExtensibleConfigurationPersister
Abstract superclass forExtensibleConfigurationPersisterimplementations.- Author:
- Brian Stansberry
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jboss.as.controller.persistence.ConfigurationPersister
ConfigurationPersister.PersistenceResource, ConfigurationPersister.SnapshotInfo
-
-
Field Summary
-
Fields inherited from interface org.jboss.as.controller.persistence.ConfigurationPersister
NULL_SNAPSHOT_INFO
-
-
Constructor Summary
Constructors Constructor Description AbstractConfigurationPersister(org.jboss.staxmapper.XMLElementWriter<ModelMarshallingContext> rootDeparser)Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeleteSnapshot(String name)Deletes a snapshot using its name.ConfigurationPersister.SnapshotInfolistSnapshots()Gets the names of the snapshots in the snapshots directoryvoidmarshallAsXml(org.jboss.dmr.ModelNode model, OutputStream output)Marshals the given configuration model to XML, writing to the given stream.voidregisterSubsystemWriter(String name, Supplier<org.jboss.staxmapper.XMLElementWriter<SubsystemMarshallingContext>> writer)Registers the writer that can marshal to XML the configuration of the named subsystem.voidsuccessfulBoot()Called once the xml has been successfully parsed, translated into updates, executed in the target controller and all services have started successfully.voidunregisterSubsystemWriter(String name)Unregisters the XML configuration writer of the named subsystem.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.as.controller.persistence.ConfigurationPersister
isPersisting, load, publish, snapshot, store
-
-
-
-
Constructor Detail
-
AbstractConfigurationPersister
public AbstractConfigurationPersister(org.jboss.staxmapper.XMLElementWriter<ModelMarshallingContext> rootDeparser)
Construct a new instance.- Parameters:
rootDeparser- the root model deparser
-
-
Method Detail
-
registerSubsystemWriter
public void registerSubsystemWriter(String name, Supplier<org.jboss.staxmapper.XMLElementWriter<SubsystemMarshallingContext>> writer)
Description copied from interface:SubsystemXmlWriterRegistryRegisters the writer that can marshal to XML the configuration of the named subsystem.- Specified by:
registerSubsystemWriterin interfaceSubsystemXmlWriterRegistry- Parameters:
name- the name of the subsystemwriter- the XML writer
-
unregisterSubsystemWriter
public void unregisterSubsystemWriter(String name)
Description copied from interface:SubsystemXmlWriterRegistryUnregisters the XML configuration writer of the named subsystem.- Specified by:
unregisterSubsystemWriterin interfaceSubsystemXmlWriterRegistry- Parameters:
name- the name of the subsystem
-
marshallAsXml
public void marshallAsXml(org.jboss.dmr.ModelNode model, OutputStream output) throws ConfigurationPersistenceExceptionMarshals the given configuration model to XML, writing to the given stream.- Specified by:
marshallAsXmlin interfaceConfigurationPersister- Parameters:
model- the model to persistoutput- the stream- Throws:
ConfigurationPersistenceException- if a configuration persistence problem occurs
-
successfulBoot
public void successfulBoot() throws ConfigurationPersistenceExceptionDescription copied from interface:ConfigurationPersisterCalled once the xml has been successfully parsed, translated into updates, executed in the target controller and all services have started successfully.- Specified by:
successfulBootin interfaceConfigurationPersister- Throws:
ConfigurationPersistenceException- if a configuration persistence problem occurs- See Also:
ConfigurationPersister.isPersisting()
-
listSnapshots
public ConfigurationPersister.SnapshotInfo listSnapshots()
Description copied from interface:ConfigurationPersisterGets the names of the snapshots in the snapshots directory- Specified by:
listSnapshotsin interfaceConfigurationPersister- Returns:
- the snapshot info. This will never return null
-
deleteSnapshot
public void deleteSnapshot(String name)
Description copied from interface:ConfigurationPersisterDeletes a snapshot using its name.- Specified by:
deleteSnapshotin interfaceConfigurationPersister- Parameters:
name- the name of the snapshot (as returned byConfigurationPersister.SnapshotInfo.names()returned fromConfigurationPersister.listSnapshots(). The whole name is not needed, just enough to uniquely identify it.
-
-