|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.splunk.modularinput.InputDefinition
public class InputDefinition
The InputDefinition
class encodes the XML defining inputs that Splunk passes to
a modular input script as a Java object.
Method Summary | |
---|---|
void |
addInput(java.lang.String name,
java.util.Collection<Parameter> parameters)
Adds an input to the set of inputs on this InputDefinition . |
boolean |
equals(java.lang.Object other)
|
java.lang.String |
getCheckpointDir()
Gets the path to which to write checkpoint files for restarting inputs. |
java.lang.String |
getField(java.lang.String fieldName)
Gets the name of the field to fetch. |
java.util.Map<java.lang.String,java.util.Map<java.lang.String,Parameter>> |
getInputs()
|
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()
Sets a session providing access to splunkd's REST API on this host. |
int |
hashCode()
|
static InputDefinition |
parseDefinition(java.io.InputStream stream)
Parses a stream containing XML into an InputDefinition. |
void |
setCheckpointDir(java.lang.String checkpointDir)
Sets the path to which to write checkpoint files. |
void |
setServerHost(java.lang.String serverHost)
Sets the name of the server on which this modular input is being run. |
void |
setServerUri(java.lang.String serverUri)
Sets the URI to reach the server on which this modular input is being run. |
void |
setSessionKey(java.lang.String sessionKey)
Sets a session key that can be used to access splunkd's REST API. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public java.lang.String getField(java.lang.String fieldName)
InputDefinition
. getField
permits
access to them in case you are constrained to an old version of the Splunk SDK for Java.
fieldName
- The name of the field to fetch.
public void setServerHost(java.lang.String serverHost)
public java.lang.String getServerHost()
public void setServerUri(java.lang.String serverUri)
serverUri
- The URI to reach the server on which this modular input is being run.public java.lang.String getServerUri()
public void setCheckpointDir(java.lang.String checkpointDir)
checkpointDir
- The path to which to write checkpoint files.public java.lang.String getCheckpointDir()
public void setSessionKey(java.lang.String sessionKey)
sessionKey
- A session key that can be used to access splunkd's REST API.public java.lang.String getSessionKey()
public void addInput(java.lang.String name, java.util.Collection<Parameter> parameters)
InputDefinition
.
name
- The name of this input (e.g., foobar://this-input-name).parameters
- A collection of Parameter
objects giving the settings for this input.public java.util.Map<java.lang.String,java.util.Map<java.lang.String,Parameter>> getInputs()
InputDefinition
.public static InputDefinition parseDefinition(java.io.InputStream stream) throws javax.xml.parsers.ParserConfigurationException, java.io.IOException, org.xml.sax.SAXException, MalformedDataException
stream
- The stream containing XML to parse.
InputDefinition
object.
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 specify a valid set of inputs.public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |