Package jmri.jmrix.configurexml
Class AbstractStreamConnectionConfigXml
java.lang.Object
jmri.configurexml.AbstractXmlAdapter
jmri.jmrix.configurexml.AbstractConnectionConfigXml
jmri.jmrix.configurexml.AbstractStreamConnectionConfigXml
- All Implemented Interfaces:
XmlAdapter
- Direct Known Subclasses:
DCCppStreamConnectionConfigXml,LnStreamConnectionConfigXml,RfidStreamConnectionConfigXml,SprogCSStreamConnectionConfigXml,XNetStreamConnectionConfigXml
Abstract base (and partial implementation) for classes persisting the status
of (non-serial) Stream Port adapters.
-
Nested Class Summary
Nested classes/interfaces inherited from class jmri.configurexml.AbstractXmlAdapter
AbstractXmlAdapter.EnumIO<T extends Enum<T>>, AbstractXmlAdapter.EnumIoMapped<T extends Enum<T>>, AbstractXmlAdapter.EnumIoNames<T extends Enum<T>>, AbstractXmlAdapter.EnumIoNamesNumbers<T extends Enum<T>>, AbstractXmlAdapter.EnumIoOrdinals<T extends Enum<T>> -
Field Summary
FieldsFields inherited from class jmri.configurexml.AbstractXmlAdapter
STR_FALSE, STR_NO, STR_TRUE, STR_YES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddispose()protected voidextendElement(org.jdom2.Element e) Customizable method if you need to add anything moreprotected AbstractStreamPortControllerget the stream port adapterprotected abstract voidgetInstance(Object object) get instanceget the stream adaptervoidUpdate static data from XML filebooleanload(org.jdom2.Element shared, org.jdom2.Element perNode) load from xml elementsprotected voidsetAdapter(AbstractStreamPortController streamPortAdapter) set the stream port adapterorg.jdom2.ElementStore the object in XMLMethods inherited from class jmri.jmrix.configurexml.AbstractConnectionConfigXml
findParmValue, getInstance, loadCommon, loadOptions, register, register, saveOptions, setOutputInterval, store, storeCommon, unpackElementMethods inherited from class jmri.configurexml.AbstractXmlAdapter
getAttributeBooleanValue, getAttributeDoubleValue, getAttributeFloatValue, getAttributeIntegerValue, getExceptionHandler, handleException, load, load, loadDeferred, loadOrder, setExceptionHandler
-
Field Details
-
adapter
-
-
Constructor Details
-
AbstractStreamConnectionConfigXml
public AbstractStreamConnectionConfigXml()constructor
-
-
Method Details
-
setAdapter
set the stream port adapter- Parameters:
streamPortAdapter- the stream port adapter to set
-
getAdapter
get the stream port adapter- Returns:
- the stream port adapter
-
getStreamAdapter
get the stream adapter- Returns:
- the stream port adapter
-
getInstance
get instance- Parameters:
object- to get the instance of
-
store
Store the object in XML- Parameters:
object- The object to be recorded. Specific XmlAdapter implementations will require this to be of a specific type; that binding is done in ConfigXmlManager.- Returns:
- The XML representation Element
-
extendElement
Customizable method if you need to add anything more- Overrides:
extendElementin classAbstractConnectionConfigXml- Parameters:
e- Element being created, update as needed
-
load
load from xml elements- Specified by:
loadin interfaceXmlAdapter- Overrides:
loadin classAbstractXmlAdapter- Parameters:
shared- elementperNode- element- Returns:
- boolean true if successful
-
load
Update static data from XML file- Specified by:
loadin interfaceXmlAdapter- Overrides:
loadin classAbstractXmlAdapter- Parameters:
element- Top level Element to unpack.o- Implementation-specific Object needed for the conversion
-
dispose
- Specified by:
disposein classAbstractConnectionConfigXml
-