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 java.util.Set<InputKind> |
inputKinds |
itemClass, items
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(java.lang.Object key) |
Input |
create(java.lang.String name)
Creates a stub for a new data input.
|
<T extends Input> |
create(java.lang.String name,
InputKind kind)
Creates a new data input based on the input kind.
|
<T extends Input> |
create(java.lang.String name,
InputKind kind,
java.util.Map<java.lang.String,java.lang.Object> args)
Creates a new data input based on the input kind and additional
arguments.
|
Input |
create(java.lang.String name,
java.util.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(java.lang.Object key)
Gets the value of a given key, if it exists within this collection.
|
Input |
get(java.lang.Object key,
Args namespace)
Returns the value of a scoped, namespace-constrained key, if it
exists within this collection.
|
java.util.Set<InputKind> |
getInputKinds()
Return a set of all the input kinds recognized by the Splunk server.
|
protected InputKind |
itemKind(java.lang.String path)
Returns the input kind for a given path.
|
protected static boolean |
matchesInputName(InputKind kind,
java.lang.String searchFor,
java.lang.String searchIn)
Indicates whether a given string matches the input name (string
equality).
|
InputCollection |
refresh()
Refreshes this input collection.
|
Input |
remove(java.lang.String key)
Removes an entity from this collection.
|
Input |
remove(java.lang.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, invalidate
protected java.util.Set<InputKind> inputKinds
public boolean containsKey(java.lang.Object key)
containsKey
in interface java.util.Map<java.lang.String,Input>
containsKey
in class ResourceCollection<Input>
public Input create(java.lang.String name)
create
in class EntityCollection<Input>
name
- Depending on the type of input, a string that contains:
java.lang.UnsupportedOperationException
public Input create(java.lang.String name, java.util.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.java.lang.UnsupportedOperationException
public <T extends Input> T create(java.lang.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(java.lang.String name, InputKind kind, java.util.Map<java.lang.String,java.lang.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(java.lang.Object key)
get
in interface java.util.Map<java.lang.String,Input>
get
in class ResourceCollection<Input>
key
- The key to look up.null
if it doesn't
exist.public Input get(java.lang.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(java.lang.String path)
path
- The relative endpoint path (the path that follows
data/inputs).InputKind
, indicating the type of input.public java.util.Set<InputKind> getInputKinds()
InputKind
s.protected static boolean matchesInputName(InputKind kind, java.lang.String searchFor, java.lang.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(java.lang.String key)
remove
in class EntityCollection<Input>
key
- The name of the entity to remove.public Input remove(java.lang.String key, Args namespace)
remove
in class EntityCollection<Input>
key
- The name of the entity to remove.namespace
- The namespace restriction within the collection.