public class ValidationDefinition
extends java.lang.Object
ValidationDefinition
class represents the XML sent by Splunk for external validation of a new modular input.Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object other) |
java.lang.String |
getCheckpointDir()
Gets the path to write checkpoint files for restarting inputs in.
|
java.lang.String |
getName()
Gets the name of the proposed modular input instance.
|
java.util.Map<java.lang.String,Parameter> |
getParameters() |
java.lang.String |
getServerHost()
Gets the name of the server on which this modular input is being run.
|
java.lang.String |
getServerUri()
Gets the URI to the server on which this modular input is being run.
|
java.lang.String |
getSessionKey()
Gets a session key providing access to splunkd's REST API on this host.
|
int |
hashCode() |
static ValidationDefinition |
parseDefinition(java.io.InputStream stream)
Create a ValidationDefinition from a provided stream containing XML.
|
void |
setParameters(java.util.Collection<Parameter> parameters)
Sets a list of
Parameter objects giving the proposed configuration. |
public java.lang.String getServerHost()
public java.lang.String getServerUri()
public java.lang.String getCheckpointDir()
public java.lang.String getSessionKey()
public java.lang.String getName()
public void setParameters(java.util.Collection<Parameter> parameters)
Parameter
objects giving the proposed configuration.parameters
- A list of Parameter
objects giving the proposed configuration.public java.util.Map<java.lang.String,Parameter> getParameters()
public static ValidationDefinition parseDefinition(java.io.InputStream stream) throws javax.xml.parsers.ParserConfigurationException, java.io.IOException, org.xml.sax.SAXException, MalformedDataException
<items>
<server_host>myHost</server_host>
<server_uri>https://127.0.0.1:8089</server_uri>
<session_key>123102983109283019283</session_key>
<checkpoint_dir>/opt/splunk/var/lib/splunk/modinputs</checkpoint_dir>
<item name="myScheme">
<param name="param1">value1</param>
<param_list name="param2">
<value>value2</value>
<value>value3</value>
<value>value4</value>
</param_list>
</item>
</items>
stream
- containing XML to parse.javax.xml.parsers.ParserConfigurationException
- if there are errors in setting up the parser (which indicates system
configuration issues).java.io.IOException
- if there is an error in reading from the stream.org.xml.sax.SAXException
- when the XML is invalid.MalformedDataException
- when the XML does not meet the required schema.public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object