Package org.wildfly.subsystem
Interface SubsystemPersistence<S extends SubsystemSchema<S>>
-
- Type Parameters:
S- the schema type
- All Known Implementing Classes:
SubsystemPersistence.DefaultSubsystemPersistence
public interface SubsystemPersistence<S extends SubsystemSchema<S>>Encapsulates the persistence configuration of a subsystem.- Author:
- Paul Ferraro
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classSubsystemPersistence.DefaultSubsystemPersistence<S extends SubsystemSchema<S>,R extends org.jboss.staxmapper.XMLElementReader<List<org.jboss.dmr.ModelNode>>>
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description org.jboss.staxmapper.XMLElementReader<List<org.jboss.dmr.ModelNode>>getReader(S schema)Returns the appropriate StAX reader for the version of the specified schema that parses subsystem XML into a set of management operations.Set<S>getSchemas()Returns the supported schemas of this subsystem.org.jboss.staxmapper.XMLElementWriter<SubsystemMarshallingContext>getWriter()Returns a StAX writer that writes the subsystem model to XML according to the current schema version.static <S extends SubsystemSchema<S>,R extends org.jboss.staxmapper.XMLElementReader<List<org.jboss.dmr.ModelNode>>>
SubsystemPersistence<S>of(Set<S> schemas, Function<S,R> readerFactory, org.jboss.staxmapper.XMLElementWriter<SubsystemMarshallingContext> writer)Creates the subsystem persistence configuration for the specified set of schemas, reader factory, and writer.static <S extends SubsystemSchema<S>,R extends org.jboss.staxmapper.XMLElementReader<List<org.jboss.dmr.ModelNode>>>
SubsystemPersistence<S>of(Set<S> schemas, Function<S,R> readerFactory, S currentSchema, org.jboss.staxmapper.XMLElementReader<List<org.jboss.dmr.ModelNode>> currentReader, org.jboss.staxmapper.XMLElementWriter<SubsystemMarshallingContext> writer)Creates the subsystem persistence configuration for the current version of the schema and specified writerstatic <S extends Enum<S> & PersistentSubsystemSchema<S>>
SubsystemPersistence<S>of(S currentSchema)Creates the subsystem persistence configuration for the current version of the schema.static <S extends Enum<S> & SubsystemSchema<S>>
SubsystemPersistence<S>of(S currentSchema, org.jboss.staxmapper.XMLElementWriter<SubsystemMarshallingContext> writer)Creates the subsystem persistence configuration for the current version of the schema and specified writer
-
-
-
Method Detail
-
getSchemas
Set<S> getSchemas()
Returns the supported schemas of this subsystem.- Returns:
- a set of schemas
-
getReader
org.jboss.staxmapper.XMLElementReader<List<org.jboss.dmr.ModelNode>> getReader(S schema)
Returns the appropriate StAX reader for the version of the specified schema that parses subsystem XML into a set of management operations.- Returns:
- a StAX reader for the version of the specified schema
-
getWriter
org.jboss.staxmapper.XMLElementWriter<SubsystemMarshallingContext> getWriter()
Returns a StAX writer that writes the subsystem model to XML according to the current schema version.- Returns:
- a StAX writer
-
of
static <S extends Enum<S> & PersistentSubsystemSchema<S>> SubsystemPersistence<S> of(S currentSchema)
Creates the subsystem persistence configuration for the current version of the schema.- Type Parameters:
S- the schema type- Parameters:
currentSchema- the current schema version- Returns:
- a subsystem persistence configuration
-
of
static <S extends Enum<S> & SubsystemSchema<S>> SubsystemPersistence<S> of(S currentSchema, org.jboss.staxmapper.XMLElementWriter<SubsystemMarshallingContext> writer)
Creates the subsystem persistence configuration for the current version of the schema and specified writer- Type Parameters:
S- the schema type- Parameters:
currentSchema- the current schema version- Returns:
- a subsystem persistence configuration
-
of
static <S extends SubsystemSchema<S>,R extends org.jboss.staxmapper.XMLElementReader<List<org.jboss.dmr.ModelNode>>> SubsystemPersistence<S> of(Set<S> schemas, Function<S,R> readerFactory, org.jboss.staxmapper.XMLElementWriter<SubsystemMarshallingContext> writer)
Creates the subsystem persistence configuration for the specified set of schemas, reader factory, and writer.- Type Parameters:
S- the schema typeR- the schema reader type- Parameters:
schemas- a set of schemasreaderFactory- a factory for creating an XML reader for a specific schemawriter- an XML reader- Returns:
- a subsystem persistence configuration
-
of
static <S extends SubsystemSchema<S>,R extends org.jboss.staxmapper.XMLElementReader<List<org.jboss.dmr.ModelNode>>> SubsystemPersistence<S> of(Set<S> schemas, Function<S,R> readerFactory, S currentSchema, org.jboss.staxmapper.XMLElementReader<List<org.jboss.dmr.ModelNode>> currentReader, org.jboss.staxmapper.XMLElementWriter<SubsystemMarshallingContext> writer)
Creates the subsystem persistence configuration for the current version of the schema and specified writer- Type Parameters:
S- the schema typeR- the schema reader type- Parameters:
schemas- a set of schemasreaderFactory- a factory for creating an XML reader for a specific schemacurrentSchema- the current schema versioncurrentReader- the XML reader for the current schema versionwriter- an XML reader- Returns:
- a subsystem persistence configuration
-
-