Class AbstractJsonCollectionHandler
- java.lang.Object
-
- org.opennms.protocols.xml.collector.AbstractXmlCollectionHandler
-
- org.opennms.protocols.json.collector.AbstractJsonCollectionHandler
-
- All Implemented Interfaces:
XmlCollectionHandler
- Direct Known Subclasses:
DefaultJsonCollectionHandler
public abstract class AbstractJsonCollectionHandler extends AbstractXmlCollectionHandler
The Abstract Class JSON Collection Handler.All JsonCollectionHandler should extend this class.
- Author:
- Ronald Roskens, Alejandro Galue
-
-
Constructor Summary
Constructors Constructor Description AbstractJsonCollectionHandler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
fillCollectionSet(CollectionAgent agent, CollectionSetBuilder builder, XmlSource source, net.sf.json.JSONObject json)
Fill collection set.protected net.sf.json.JSONObject
getJSONObject(java.lang.String urlString, Request request)
Gets the JSON object.protected java.util.Date
getTimeStamp(org.apache.commons.jxpath.JXPathContext context, XmlGroup group)
Gets the time stamp.protected static net.sf.json.JSONObject
wrapArray(net.sf.json.JSON json)
-
Methods inherited from class org.opennms.protocols.xml.collector.AbstractXmlCollectionHandler
applyXsltTransformation, collect, fillCollectionSet, fillCollectionSet, getBlobStore, getCollectionResource, getResourceStorageDao, getRrdRepository, getServiceName, getTimeStamp, getXmlDocument, getXmlDocument, parseRequest, parseString, parseUrl, preProcessHtml, processXmlResource, setBlobStore, setResourceStorageDao, setRrdRepository, setServiceName
-
-
-
-
Method Detail
-
fillCollectionSet
protected void fillCollectionSet(CollectionAgent agent, CollectionSetBuilder builder, XmlSource source, net.sf.json.JSONObject json) throws java.text.ParseException
Fill collection set.- Parameters:
agent
- the agentcollectionSet
- the collection setsource
- the sourcejson
- the JSON Object- Throws:
java.text.ParseException
- the parse exception
-
getTimeStamp
protected java.util.Date getTimeStamp(org.apache.commons.jxpath.JXPathContext context, XmlGroup group)
Gets the time stamp.- Parameters:
context
- the JXPath contextgroup
- the group- Returns:
- the time stamp
-
getJSONObject
protected net.sf.json.JSONObject getJSONObject(java.lang.String urlString, Request request) throws java.lang.Exception
Gets the JSON object.- Parameters:
urlString
- the URL stringrequest
- the request- Returns:
- the JSON object
- Throws:
java.lang.Exception
- the exception
-
wrapArray
protected static net.sf.json.JSONObject wrapArray(net.sf.json.JSON json)
-
-