|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.splunk.modularinput.Script
public abstract class Script
The Script
class is an abstract base class for implementing modular inputs. Subclasses
should override getScheme
and streamEvents
, and optional configureValidator
if the modular
input is using external validation.
Constructor Summary | |
---|---|
Script()
|
Method Summary | |
---|---|
abstract Scheme |
getScheme()
Gets the scheme that defines the parameters understood by this modular input. |
int |
run(java.lang.String[] args)
Encodes all the common behavior of modular inputs. |
int |
run(java.lang.String[] args,
EventWriter eventWriter,
java.io.InputStream in)
Encodes all the common behavior of modular inputs. |
abstract void |
streamEvents(InputDefinition inputs,
EventWriter ew)
Streams events into Splunk. |
void |
validateInput(ValidationDefinition definition)
Handles external validation for modular input kinds. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Script()
Method Detail |
---|
public int run(java.lang.String[] args)
args
- An array of command line arguments passed to this script.
public int run(java.lang.String[] args, EventWriter eventWriter, java.io.InputStream in)
args
- An array of command line arguments passed to this script.eventWriter
- An EventWriter
.in
- An InputStream
.
public abstract Scheme getScheme()
Scheme
object representing the parameters for this modular input.public void validateInput(ValidationDefinition definition) throws java.lang.Exception
definition
- The parameters for the proposed input passed by splunkd.
java.lang.Exception
public abstract void streamEvents(InputDefinition inputs, EventWriter ew) throws MalformedDataException, javax.xml.stream.XMLStreamException, java.io.IOException
EventWriter
rather than assuming that there is a console attached.
ew
- An object with methods to write events and log messages to Splunk.
MalformedDataException
javax.xml.stream.XMLStreamException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |