public class Scheme extends Object
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.Modifier and Type | Class and Description |
---|---|
static class |
Scheme.StreamingMode |
Modifier and Type | Field and Description |
---|---|
protected List<Argument> |
arguments |
protected String |
description |
protected Scheme.StreamingMode |
streamingMode |
protected String |
title |
protected boolean |
useExternalValidation |
protected boolean |
useSingleInstance |
Modifier and Type | Method and Description |
---|---|
void |
addArgument(Argument argument)
Appends an argument to the arguments that this modular input kind takes.
|
List<Argument> |
getArguments()
Returns all the arguments to this modular input kind.
|
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.
|
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(List<Argument> arguments)
Replaces the current list of arguments with the specified one.
|
void |
setDescription(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(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.
|
protected String title
protected String description
protected boolean useExternalValidation
protected boolean useSingleInstance
protected Scheme.StreamingMode streamingMode
public Scheme(String title)
public String getTitle()
public void setTitle(String title)
title
- The title of this modular input kind.public String getDescription()
public void setDescription(String description)
description
- The human readable description of this modular input kind.public boolean isUseExternalValidation()
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.public void setUseExternalValidation(boolean useExternalValidation)
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.public boolean isUseSingleInstance()
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.public void setUseSingleInstance(boolean useSingleInstance)
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.public Scheme.StreamingMode getStreamingMode()
public void setStreamingMode(Scheme.StreamingMode streamingMode)
streamingMode
- The streaming mode.public List<Argument> getArguments()
public void setArguments(List<Argument> arguments)
arguments
- The list of arguments with which to replace the current
list of arguments.public void addArgument(Argument argument)
argument
- The argument to append to the arguments.Copyright © 2022 Splunk, Inc.. All rights reserved.