com.splunk.modularinput
Class Scheme

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

public class Scheme
extends java.lang.Object

The Scheme class represents the metadata for a modular input kind. A Scheme specifies a title, description, several options of how Splunk should run modular inputs of this kind, and a set of arguments which define a particular modular input's properties. The primary use of Scheme is to abstract away the construction of XML to feed to Splunk.


Nested Class Summary
static class Scheme.StreamingMode
           
 
Field Summary
protected  java.util.List<Argument> arguments
           
protected  java.lang.String description
           
protected  Scheme.StreamingMode streamingMode
           
protected  java.lang.String title
           
protected  boolean useExternalValidation
           
protected  boolean useSingleInstance
           
 
Constructor Summary
Scheme(java.lang.String title)
           
 
Method Summary
 void addArgument(Argument argument)
          Appends an argument to the arguments that this modular input kind takes.
 java.util.List<Argument> getArguments()
          Returns all the arguments to this modular input kind.
 java.lang.String getDescription()
          Gets the human readable description of this modular input kind.
 Scheme.StreamingMode getStreamingMode()
          Returns whether this modular input kind will send events to Splunk as XML (the default and preferred value) or plain text.
 java.lang.String getTitle()
          Gets the title of this modular input kind.
 boolean isUseExternalValidation()
          Returns whether Splunk should use the modular input kind script to validate the arguments of a particular modular input or use the validation predicates specified by the arguments.
 boolean isUseSingleInstance()
          Returns whether Splunk should run all modular inputs of this kind via one instance of the script or start an instance for each modular input.
 void setArguments(java.util.List<Argument> arguments)
          Replaces the current list of arguments with the specified one.
 void setDescription(java.lang.String description)
          Sets the human readable description of this modular input kind.
 void setStreamingMode(Scheme.StreamingMode streamingMode)
          Specifies whether this modular input kind will send events to Splunk as XML (the default and preferred value) or plain text.
 void setTitle(java.lang.String title)
          Sets the title of this modular input kind.
 void setUseExternalValidation(boolean useExternalValidation)
          Specifies whether Splunk should use the modular input kind script to validate the arguments of a particular modular input (true) or use the validation predicates specified by the arguments (false).
 void setUseSingleInstance(boolean useSingleInstance)
          Specifies whether Splunk should run all modular inputs of this kind via one instance of the script or start an instance for each modular input.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

title

protected java.lang.String title

description

protected java.lang.String description

useExternalValidation

protected boolean useExternalValidation

useSingleInstance

protected boolean useSingleInstance

streamingMode

protected Scheme.StreamingMode streamingMode

arguments

protected java.util.List<Argument> arguments
Constructor Detail

Scheme

public Scheme(java.lang.String title)
Method Detail

getTitle

public java.lang.String getTitle()
Gets the title of this modular input kind.

Returns:
The title of this modular input kind.

setTitle

public void setTitle(java.lang.String title)
Sets the title of this modular input kind.

Parameters:
title - The title of this modular input kind.

getDescription

public java.lang.String getDescription()
Gets the human readable description of this modular input kind.

Returns:
The human readable description of this modular input kind.

setDescription

public void setDescription(java.lang.String description)
Sets the human readable description of this modular input kind.

Parameters:
description - The human readable description of this modular input kind.

isUseExternalValidation

public boolean isUseExternalValidation()
Returns whether Splunk should use the modular input kind script to validate the arguments of a particular modular input or use the validation predicates specified by the arguments.

Returns:
true if Splunk should use the modular input kind script to validate the arguments of a particular modular input, false if it should use the validation predicates specified by the arguments.

setUseExternalValidation

public void setUseExternalValidation(boolean useExternalValidation)
Specifies whether Splunk should use the modular input kind script to validate the arguments of a particular modular input (true) or use the validation predicates specified by the arguments (false).

Parameters:
useExternalValidation - true if Splunk should use the modular input kind script to validate the arguments of a particular modular input, false if it should use the validation predicates specified by the arguments.

isUseSingleInstance

public boolean isUseSingleInstance()
Returns whether Splunk should run all modular inputs of this kind via one instance of the script or start an instance for each modular input.

Returns:
true if Splunk should run all modular inputs of this kind via one instance of the script, false if it should start an instance for each modular input.

setUseSingleInstance

public void setUseSingleInstance(boolean useSingleInstance)
Specifies whether Splunk should run all modular inputs of this kind via one instance of the script or start an instance for each modular input.

Parameters:
useSingleInstance - true if Splunk should run all modular inputs of this kind via one instance of the script, false if it should start an instance for each modular input.

getStreamingMode

public Scheme.StreamingMode getStreamingMode()
Returns whether this modular input kind will send events to Splunk as XML (the default and preferred value) or plain text.

Returns:
The streaming mode.

setStreamingMode

public void setStreamingMode(Scheme.StreamingMode streamingMode)
Specifies whether this modular input kind will send events to Splunk as XML (the default and preferred value) or plain text.

Parameters:
streamingMode - The streaming mode.

getArguments

public java.util.List<Argument> getArguments()
Returns all the arguments to this modular input kind.

Returns:
A list of all the arguments to this modular input kind.

setArguments

public void setArguments(java.util.List<Argument> arguments)
Replaces the current list of arguments with the specified one.

Parameters:
arguments - The list of arguments with which to replace the current list of arguments.

addArgument

public void addArgument(Argument argument)
Appends an argument to the arguments that this modular input kind takes.

Parameters:
argument - The argument to append to the arguments.