com.splunk.modularinput
Class ValidationDefinition

java.lang.Object
  extended by com.splunk.modularinput.ValidationDefinition

public class ValidationDefinition
extends java.lang.Object

The ValidationDefinition class represents the XML sent by Splunk for external validation of a new modular input.


Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getServerHost

public java.lang.String getServerHost()
Gets the name of the server on which this modular input is being run.

Returns:
The name of the server on which this modular input is being run.

getServerUri

public java.lang.String getServerUri()
Gets the URI to the server on which this modular input is being run.

Returns:
The URI to the server on which this modular input is being run.

getCheckpointDir

public java.lang.String getCheckpointDir()
Gets the path to write checkpoint files for restarting inputs in.

Returns:
The path to write checkpoint files for restarting inputs in.

getSessionKey

public java.lang.String getSessionKey()
Gets a session key providing access to splunkd's REST API on this host.

Returns:
A session key providing access to splunkd's REST API on this host.

getName

public java.lang.String getName()
Gets the name of the proposed modular input instance.

Returns:
The name of the proposed modular input instance.

setParameters

public void setParameters(java.util.Collection<Parameter> parameters)
Sets a list of Parameter objects giving the proposed configuration.

Parameters:
parameters - A list of Parameter objects giving the proposed configuration.

getParameters

public java.util.Map<java.lang.String,Parameter> getParameters()
Returns:
The parameters on the proposed input.

parseDefinition

public static ValidationDefinition parseDefinition(java.io.InputStream stream)
                                            throws javax.xml.parsers.ParserConfigurationException,
                                                   java.io.IOException,
                                                   org.xml.sax.SAXException,
                                                   MalformedDataException
Create a ValidationDefinition from a provided stream containing XML. The XML typically will look like
 <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>
 
 

Parameters:
stream - containing XML to parse.
Returns:
a ValidationDefinition.
Throws:
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.

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object