Class JPlotResponse
- java.lang.Object
-
- org.epics.archiverappliance.retrieval.mimeresponses.JPlotResponse
-
- All Implemented Interfaces:
EventConsumer
,MimeResponse
public class JPlotResponse extends Object implements MimeResponse
- Author:
- mshankar Sends the event data as a JSON response tailored to JPlot, which is used in the test page.. The response is a array of array of data series: [ series1, series2, ... ] A series can either be raw data or an object with properties. The raw data format is an array of points: [ [x1, y1], [x2, y2], ... ] E.g. [ [1, 3], [2, 14.01], [3.5, 3.14] ]
-
-
Field Summary
-
Fields inherited from interface org.epics.archiverappliance.retrieval.mimeresponses.MimeResponse
ACCESS_CONTROL_ALLOW_ORIGIN, CONTENT_TYPE, PROXIED_HEADERS
-
-
Constructor Summary
Constructors Constructor Description JPlotResponse()
-
Method Summary
Modifier and Type Method Description void
close()
void
consumeEvent(Event e)
HashMap<String,String>
getExtraHeaders()
Get extra headers that are to be added to the response.void
processingPV(BasicContext retrievalContext, String pv, Timestamp start, Timestamp end, EventStreamDesc streamDesc)
Called when we swich to a new PV.void
setOutputStream(OutputStream os)
void
swicthingToStream(EventStream strm)
-
-
-
Method Detail
-
consumeEvent
public void consumeEvent(Event e) throws Exception
- Specified by:
consumeEvent
in interfaceEventConsumer
- Throws:
Exception
-
setOutputStream
public void setOutputStream(OutputStream os)
- Specified by:
setOutputStream
in interfaceMimeResponse
-
close
public void close()
- Specified by:
close
in interfaceMimeResponse
-
processingPV
public void processingPV(BasicContext retrievalContext, String pv, Timestamp start, Timestamp end, EventStreamDesc streamDesc)
Description copied from interface:MimeResponse
Called when we swich to a new PV.- Specified by:
processingPV
in interfaceMimeResponse
pv
- The name of PVstart
- Timestampend
- TimestampstreamDesc
- Could be null if we have no data in first store we hit.
-
swicthingToStream
public void swicthingToStream(EventStream strm)
- Specified by:
swicthingToStream
in interfaceMimeResponse
-
getExtraHeaders
public HashMap<String,String> getExtraHeaders()
Description copied from interface:MimeResponse
Get extra headers that are to be added to the response. For this to work correctly in a clustered environment, you'll need to add the header to the set of proxiedHeaders below- Specified by:
getExtraHeaders
in interfaceMimeResponse
- Returns:
- HashMap ExtraHeaders
-
-