Interface MimeResponse
-
- All Superinterfaces:
EventConsumer
- All Known Implementing Classes:
FlxXMLResponse
,JPlotResponse
,JSONResponse
,MatlabResponse
,PBRAWResponse
,PvaMimeResponse
,QWResponse
,SinglePVCSVResponse
,SVGResponse
,TextResponse
public interface MimeResponse extends EventConsumer
A set of events for classes that convert event streams to mime specific responses. setOutputStream signals the start of the whole package processingPV signals the start of a new PV's data in the package swicthingToStream signals that we have a new event stream in the current PV; so stream specific headers could be added here. close signifies the end of the whole package. Note we get both one processingPV and potentially many swicthingToStream for each PV in the package.- Author:
- mshankar
-
-
Field Summary
Fields Modifier and Type Field Description static String
ACCESS_CONTROL_ALLOW_ORIGIN
static String
CONTENT_TYPE
static String[]
PROXIED_HEADERS
Headers that should be proxied across in a clustered environment should be added to this list.
-
Method Summary
Modifier and Type Method Description void
close()
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)
-
Methods inherited from interface org.epics.archiverappliance.retrieval.EventConsumer
consumeEvent
-
-
-
-
Field Detail
-
ACCESS_CONTROL_ALLOW_ORIGIN
static final String ACCESS_CONTROL_ALLOW_ORIGIN
- See Also:
- Constant Field Values
-
CONTENT_TYPE
static final String CONTENT_TYPE
- See Also:
- Constant Field Values
-
PROXIED_HEADERS
static final String[] PROXIED_HEADERS
Headers that should be proxied across in a clustered environment should be added to this list.
-
-
Method Detail
-
setOutputStream
void setOutputStream(OutputStream os)
-
getExtraHeaders
HashMap<String,String> getExtraHeaders()
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- Returns:
- HashMap ExtraHeaders
-
processingPV
void processingPV(BasicContext retrievalContext, String pv, Timestamp start, Timestamp end, EventStreamDesc streamDesc)
Called when we swich to a new PV.- Parameters:
pv
- The name of PVstart
- Timestampend
- TimestampstreamDesc
- Could be null if we have no data in first store we hit.
-
swicthingToStream
void swicthingToStream(EventStream strm)
-
close
void close()
-
-