Class ArchiverValuesHandler
java.lang.Object
org.epics.archiverappliance.retrieval.channelarchiver.ArchiverValuesHandler
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterable<Event>,Iterator<Event>,EventStream,XMLRPCStaxProcessor,RemotableOverRaw
public class ArchiverValuesHandler
extends Object
implements XMLRPCStaxProcessor, EventStream, Iterator<Event>, RemotableOverRaw
Quick handler to parse archiver.values returns.
We use STAX to enable stream processing at least from this side of the socket...
- Author:
- mshankar
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionArchiverValuesHandler(String pvName, InputStream is, String source, ArchDBRTypes expectedDBRType) Create a archive.values handler given an event stream. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleanendElement(String localName, String value) intbooleanhasNext()Do we have another event?iterator()next()Get the next eventvoidremove()booleanstartElement(String localName) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
ArchiverValuesHandler
public ArchiverValuesHandler(String pvName, InputStream is, String source, ArchDBRTypes expectedDBRType) throws IOException Create a archive.values handler given an event stream. If all goes well, processing should stop after each event (and hence should stop after the first event).- Parameters:
pvName- The name of PVis- InputStreamsource-expectedDBRType- This is the expected DBR type. This can be null in which case we do a best guess.- Throws:
IOException-
-
-
Method Details
-
startElement
- Specified by:
startElementin interfaceXMLRPCStaxProcessor- Throws:
IOException
-
endElement
- Specified by:
endElementin interfaceXMLRPCStaxProcessor- Throws:
IOException
-
hasNext
public boolean hasNext()Do we have another event? -
next
Get the next event -
getMetaInformation
-
getValueType
-
getElementCount
public int getElementCount() -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
iterator
-
getDescription
- Specified by:
getDescriptionin interfaceEventStream- Specified by:
getDescriptionin interfaceRemotableOverRaw
-
remove
public void remove()
-