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
- Author:
- mshankar
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ArchiverValuesHandler.ArchiverValuesType
-
Constructor Summary
Constructors Constructor Description ArchiverValuesHandler(String pvName, InputStream is, String source, ArchDBRTypes expectedDBRType)
Create a archive.values handler given an event stream.
-
Method Summary
Modifier and Type Method Description void
close()
boolean
endElement(String localName, String value)
RemotableEventStreamDesc
getDescription()
int
getElementCount()
HashMap<String,String>
getMetaInformation()
ArchiverValuesHandler.ArchiverValuesType
getValueType()
boolean
hasNext()
Do we have another event?Iterator<Event>
iterator()
Event
next()
Get the next eventvoid
remove()
boolean
startElement(String localName)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
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 Detail
-
startElement
public boolean startElement(String localName) throws IOException
- Specified by:
startElement
in interfaceXMLRPCStaxProcessor
- Throws:
IOException
-
endElement
public boolean endElement(String localName, String value) throws IOException
- Specified by:
endElement
in interfaceXMLRPCStaxProcessor
- Throws:
IOException
-
hasNext
public boolean hasNext()
Do we have another event?
-
next
public Event next()
Get the next event
-
getValueType
public ArchiverValuesHandler.ArchiverValuesType getValueType()
-
getElementCount
public int getElementCount()
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
getDescription
public RemotableEventStreamDesc getDescription()
- Specified by:
getDescription
in interfaceEventStream
- Specified by:
getDescription
in interfaceRemotableOverRaw
-
-