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
public abstract class AbstractUsbConnectionConfigXml extends AbstractConnectionConfigXml
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 java.lang.Enum<T>>, AbstractXmlAdapter.EnumIoMapped<T extends java.lang.Enum<T>>, AbstractXmlAdapter.EnumIoNames<T extends java.lang.Enum<T>>, AbstractXmlAdapter.EnumIoNamesNumbers<T extends java.lang.Enum<T>>, AbstractXmlAdapter.EnumIoOrdinals<T extends java.lang.Enum<T>>
-
-
Field Summary
Fields Modifier and Type Field Description protected UsbPortAdapteradapter-
Fields inherited from class jmri.configurexml.AbstractXmlAdapter
STR_FALSE, STR_NO, STR_TRUE, STR_YES
-
-
Constructor Summary
Constructors Constructor Description AbstractUsbConnectionConfigXml()constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voiddispose()protected voidextendElement(org.jdom2.Element e)Customizable method if you need to add anything moreprotected UsbPortAdaptergetAdapter()get the usb port adapterprotected abstract voidgetInstance(java.lang.Object object)get instancevoidload(org.jdom2.Element element, java.lang.Object o)Update 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(java.lang.Object object)Store the object in XML-
Methods inherited from class jmri.jmrix.configurexml.AbstractConnectionConfigXml
findParmValue, getInstance, loadCommon, loadOptions, register, register, saveOptions, setOutputInterval, store, storeCommon, unpackElement
-
Methods inherited from class jmri.configurexml.AbstractXmlAdapter
getAttributeBooleanValue, getAttributeDoubleValue, getAttributeFloatValue, getAttributeIntegerValue, getExceptionHandler, handleException, load, load, loadDeferred, loadOrder, setExceptionHandler
-
-
-
-
Field Detail
-
adapter
protected UsbPortAdapter adapter
-
-
Constructor Detail
-
AbstractUsbConnectionConfigXml
public AbstractUsbConnectionConfigXml()
constructor
-
-
Method Detail
-
setAdapter
protected void setAdapter(UsbPortAdapter usbPortAdapter)
set the usb port adapter- Parameters:
usbPortAdapter- the usb port adapter to set
-
getAdapter
protected UsbPortAdapter getAdapter()
get the usb port adapter- Returns:
- the usb port adapter
-
getInstance
protected abstract void getInstance(java.lang.Object object)
get instance- Parameters:
object- to get the instance of
-
store
public org.jdom2.Element store(java.lang.Object object)
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
protected void extendElement(org.jdom2.Element e)
Customizable method if you need to add anything more- Overrides:
extendElementin classAbstractConnectionConfigXml- Parameters:
e- Element being created, update as needed
-
load
public boolean load(org.jdom2.Element shared, org.jdom2.Element perNode)
load from xml elements- Specified by:
loadin interfaceXmlAdapter- Overrides:
loadin classAbstractXmlAdapter- Parameters:
shared- elementperNode- element- Returns:
- boolean true if successful
-
load
public void load(org.jdom2.Element element, java.lang.Object o)
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
protected void dispose()
- Specified by:
disposein classAbstractConnectionConfigXml
-
-