public class InputCollection extends EntityCollection<Input>
InputCollection
class represents a collection of inputs. The
collection is heterogeneous and each member contains an InputKind
value that indicates the specific type of input.Modifier and Type | Field and Description |
---|---|
protected Set<InputKind> |
inputKinds |
itemClass, items
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(Object key) |
Input |
create(String name)
Creates a stub for a new data input.
|
<T extends Input> |
create(String name,
InputKind kind)
Creates a new data input based on the input kind.
|
<T extends Input> |
create(String name,
InputKind kind,
Map<String,Object> args)
Creates a new data input based on the input kind and additional
arguments.
|
Input |
create(String name,
Map args)
Creates a stub for a new data input based on additional arguments.
|
protected Input |
createItem(AtomEntry entry)
Creates a new data input based on an Atom entry.
|
Input |
get(Object key)
Gets the value of a given key, if it exists within this collection.
|
Input |
get(Object key,
Args namespace)
Returns the value of a scoped, namespace-constrained key, if it
exists within this collection.
|
Set<InputKind> |
getInputKinds()
Return a set of all the input kinds recognized by the Splunk server.
|
protected InputKind |
itemKind(String path)
Returns the input kind for a given path.
|
protected static boolean |
matchesInputName(InputKind kind,
String searchFor,
String searchIn)
Indicates whether a given string matches the input name (string
equality).
|
InputCollection |
refresh()
Refreshes this input collection.
|
Input |
remove(String key)
Removes an entity from this collection.
|
Input |
remove(String key,
Args namespace)
Removes an entity from this collection, with a namespace restriction.
|
clear, containsKey, containsValue, createItem, entrySet, equals, hashCode, isEmpty, itemKey, itemPath, keySet, list, put, putAll, remove, size, validate, values, valueSize
getName, getPath, getService, getTitle, getUpdated, invalidate
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
public boolean containsKey(Object key)
containsKey
in interface Map<String,Input>
containsKey
in class ResourceCollection<Input>
public Input create(String name)
create
in class EntityCollection<Input>
name
- Depending on the type of input, a string that contains:
UnsupportedOperationException
- The UnsupportedOperationException instancepublic Input create(String name, Map args)
create
in class EntityCollection<Input>
name
- Depending on the type of data input, a string that contains:
args
- Optional arguments to define the data input. For a list of
the available parameters, see
Input parameters on
dev.splunk.com.UnsupportedOperationException
- The UnsupportedOperationException instancepublic <T extends Input> T create(String name, InputKind kind)
T
- The implicit type of the input.name
- Depending on the type of data input, a string that contains:
kind
- A member of InputKind
, indicating the type of input.Input
that was created.public <T extends Input> T create(String name, InputKind kind, Map<String,Object> args)
T
- The implicit type of the input.name
- Depending on the type of data input, a string that contains:
kind
- A member of InputKind
, indicating the type of input.args
- Optional arguments to define the data input. For a list of
the available parameters, see
Input parameters on
dev.splunk.com.Input
that was created.protected Input createItem(AtomEntry entry)
createItem
in class ResourceCollection<Input>
entry
- The AtomEntry
object describing the entry.Input
that was created.public Input get(Object key)
public Input get(Object key, Args namespace)
get
in class ResourceCollection<Input>
key
- The key to look up.namespace
- The namespace to constrain the search to.null
if it doesn't
exist.protected InputKind itemKind(String path)
path
- The relative endpoint path (the path that follows
data/inputs).InputKind
, indicating the type of input.public Set<InputKind> getInputKinds()
InputKind
s.protected static boolean matchesInputName(InputKind kind, String searchFor, String searchIn)
kind
- A member of InputKind
, indicating the type of input.searchFor
- A string to search for.searchIn
- The string that contains the input name.true
if the string matches the input name, false
if not.public InputCollection refresh()
refresh
in class ResourceCollection<Input>
InputCollection
.public Input remove(String key)
remove
in class EntityCollection<Input>
key
- The name of the entity to remove.public Input remove(String key, Args namespace)
remove
in class EntityCollection<Input>
key
- The name of the entity to remove.namespace
- The namespace restriction within the collection.Copyright © 2022 Splunk, Inc.. All rights reserved.