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 UsbPortAdapter
adapter
-
Constructor Summary
Constructors Constructor Description AbstractUsbConnectionConfigXml()
constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
dispose()
protected void
extendElement(org.jdom2.Element e)
Customizable method if you need to add anything moreprotected UsbPortAdapter
getAdapter()
get the usb port adapterprotected abstract void
getInstance(java.lang.Object object)
get instancevoid
load(org.jdom2.Element element, java.lang.Object o)
Update static data from XML fileboolean
load(org.jdom2.Element shared, org.jdom2.Element perNode)
load from xml elementsprotected void
setAdapter(UsbPortAdapter usbPortAdapter)
set the usb port adapterorg.jdom2.Element
store(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:
extendElement
in 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:
load
in interfaceXmlAdapter
- Overrides:
load
in 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:
load
in interfaceXmlAdapter
- Overrides:
load
in classAbstractXmlAdapter
- Parameters:
element
- Top level Element to unpack.o
- Implementation-specific Object needed for the conversion
-
dispose
protected void dispose()
- Specified by:
dispose
in classAbstractConnectionConfigXml
-
-