|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opennms.protocols.xml.collector.AbstractXmlCollectionHandler
public abstract class AbstractXmlCollectionHandler
The Abstract Class XML Collection Handler.
All XmlCollectionHandler should extend this class.
| Constructor Summary | |
|---|---|
AbstractXmlCollectionHandler()
|
|
| Method Summary | |
|---|---|
protected void |
fillCollectionSet(CollectionAgent agent,
XmlCollectionSet collectionSet,
XmlSource source,
Document doc)
Fill collection set. |
protected XmlCollectionResource |
getCollectionResource(CollectionAgent agent,
String instance,
String resourceType,
Date timestamp)
Gets the collection resource. |
RrdRepository |
getRrdRepository()
Gets the RRD repository. |
String |
getServiceName()
Gets the service name. |
protected Date |
getTimeStamp(Document doc,
XPath xpath,
XmlGroup group)
Gets the time stamp. |
protected Document |
getXmlDocument(String urlString)
Gets the XML document. |
protected XmlResourceType |
getXmlResourceType(CollectionAgent agent,
String resourceType)
Gets the XML resource type. |
protected ThreadCategory |
log()
Log. |
protected String |
parseUrl(String unformattedUrl,
CollectionAgent agent,
Integer collectionStep)
Parses the URL. |
protected abstract void |
processXmlResource(XmlCollectionResource collectionResource,
AttributeGroupType attribGroupType)
Process XML resource. |
void |
setRrdRepository(RrdRepository m_rrdRepository)
Sets the RRD repository. |
void |
setServiceName(String serviceName)
Sets the service name associated with this Collection Handler. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.opennms.protocols.xml.collector.XmlCollectionHandler |
|---|
collect |
| Constructor Detail |
|---|
public AbstractXmlCollectionHandler()
| Method Detail |
|---|
public void setServiceName(String serviceName)
XmlCollectionHandler
setServiceName in interface XmlCollectionHandlerserviceName - the new service namepublic void setRrdRepository(RrdRepository m_rrdRepository)
XmlCollectionHandler
setRrdRepository in interface XmlCollectionHandlerm_rrdRepository - the new RRD repositorypublic String getServiceName()
public RrdRepository getRrdRepository()
protected void fillCollectionSet(CollectionAgent agent,
XmlCollectionSet collectionSet,
XmlSource source,
Document doc)
throws XPathExpressionException,
ParseException
agent - the agentcollectionSet - the collection setsource - the sourcedoc - the doc
XPathExpressionException - the x path expression exception
ParseException - the parse exception
protected abstract void processXmlResource(XmlCollectionResource collectionResource,
AttributeGroupType attribGroupType)
collectionResource - the collection resourceattribGroupType - the attribute group type
protected XmlCollectionResource getCollectionResource(CollectionAgent agent,
String instance,
String resourceType,
Date timestamp)
agent - the collection agentinstance - the resource instanceresourceType - the resource typetimestamp - the timestamp
protected Date getTimeStamp(Document doc,
XPath xpath,
XmlGroup group)
throws XPathExpressionException
doc - the docxpath - the xpathgroup - the group
XPathExpressionException - the x path expression exception
protected String parseUrl(String unformattedUrl,
CollectionAgent agent,
Integer collectionStep)
Valid placeholders are:
unformattedUrl - the unformatted URLagent - the collection agentcollectionStep - the collection step (in seconds)
protected Document getXmlDocument(String urlString)
urlString - the URL string
protected XmlResourceType getXmlResourceType(CollectionAgent agent,
String resourceType)
agent - the collection agentresourceType - the resource type
protected ThreadCategory log()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||