Package jmri.jmrix.configurexml
Class AbstractUsbConnectionConfigXml
java.lang.Object
jmri.configurexml.AbstractXmlAdapter
jmri.jmrix.configurexml.AbstractConnectionConfigXml
jmri.jmrix.configurexml.AbstractUsbConnectionConfigXml
- All Implemented Interfaces:
XmlAdapter
- Direct Known Subclasses:
AnymaDMX_ConnectionConfigXml
Abstract base (and partial implementation) for classes persisting the status
of (non-serial) USB adapters.
IOW: if you're just using usb to access a serial buss on the other side then you should be using AbstractSerialConnectionConfigXml instead.
-
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 UsbPortAdapterget the usb port adapterprotected abstract voidgetInstance(Object object) get instancevoidUpdate static data from XML filebooleanload(org.jdom2.Element shared, org.jdom2.Element perNode) load from xml elementsprotected voidsetAdapter(UsbPortAdapter usbPortAdapter) set the usb 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
-
AbstractUsbConnectionConfigXml
public AbstractUsbConnectionConfigXml()constructor
-
-
Method Details
-
setAdapter
set the usb port adapter- Parameters:
usbPortAdapter- the usb port adapter to set
-
getAdapter
get the usb port adapter- Returns:
- the usb 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
-