com.splunk
Class InputCollection

java.lang.Object
  extended by com.splunk.Resource
      extended by com.splunk.ResourceCollection<T>
          extended by com.splunk.EntityCollection<Input>
              extended by com.splunk.InputCollection
All Implemented Interfaces:
java.util.Map<java.lang.String,Input>

public class InputCollection
extends EntityCollection<Input>

The 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 (input kind).


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class com.splunk.ResourceCollection
itemClass, items
 
Fields inherited from class com.splunk.Resource
actions, partialPath, path, refreshArgs, service, title
 
Method Summary
 boolean containsKey(java.lang.Object key)
          
 Input create(java.lang.String name)
          Creates a stub.
<T extends Input>
T
create(java.lang.String name, InputKind kind)
          Creates a specific kind of input.
<T extends Input>
T
create(java.lang.String name, InputKind kind, java.util.Map<java.lang.String,java.lang.Object> args)
          Creates a specific kind of input by providing arguments.For details, see the POST request arguments for the data/inputs/* endpoints in the Splunk REST API documentation.
 Input create(java.lang.String name, java.util.Map args)
          Creates a stub by providing additional arguments.
protected  Input createItem(AtomEntry entry)
          Creates an Input resource item.
 Input get(java.lang.Object key)
          Gets a the value of 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.
protected  InputKind itemKind(java.lang.String path)
          Returns the path's InputKind value.
 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.
 
Methods inherited from class com.splunk.ResourceCollection
clear, containsKey, containsValue, createItem, entrySet, equals, hashCode, isEmpty, itemKey, itemPath, keySet, list, put, putAll, remove, size, validate, values, valueSize
 
Methods inherited from class com.splunk.Resource
getActions, getName, getPath, getService, getTitle, invalidate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

containsKey

public boolean containsKey(java.lang.Object key)

Specified by:
containsKey in interface java.util.Map<java.lang.String,Input>
Overrides:
containsKey in class ResourceCollection<Input>

create

public Input create(java.lang.String name)
Creates a stub.

Overrides:
create in class EntityCollection<Input>
Parameters:
name - The name of the input based on the type: the filename or directory and path (monitor, oneshot), the script name (script), the port number (TCP, UDP), the collection name (Windows perfmon, WMI), the stanza (Windows Registry), or the name of the configuration (AD).
Returns:
No return value.
Throws:
java.lang.UnsupportedOperationException

create

public Input create(java.lang.String name,
                    java.util.Map args)
Creates a stub by providing additional arguments. For details, see the POST request arguments for the data/inputs/* endpoints in the Splunk REST API documentation.

Overrides:
create in class EntityCollection<Input>
Parameters:
name - The name of the input based on the type: the filename or directory and path (monitor, oneshot), the script name (script), the port number (TCP, UDP), the collection name (Windows perfmon, WMI), the stanza (Windows Registry), or the name of the configuration (AD).
args - Optional arguments.
Returns:
No return value.
Throws:
java.lang.UnsupportedOperationException

create

public <T extends Input> T create(java.lang.String name,
                                  InputKind kind)
Creates a specific kind of input.

Type Parameters:
T - The implicit type of the input.
Parameters:
name - The name of the input based on the type: the filename or directory and path (monitor, oneshot), the script name (script), the port number (TCP, UDP), the collection name (Windows perfmon, WMI), the stanza (Windows Registry), or the name of the configuration (AD).
kind - The specific kind of input.
Returns:
The input that was created.

create

public <T extends Input> T create(java.lang.String name,
                                  InputKind kind,
                                  java.util.Map<java.lang.String,java.lang.Object> args)
Creates a specific kind of input by providing arguments.For details, see the POST request arguments for the data/inputs/* endpoints in the Splunk REST API documentation.

Type Parameters:
T - The implicit type of the input.
Parameters:
name - The name of the input based on the type: the filename or directory and path (monitor, oneshot), the script name (script), the port number (TCP, UDP), the collection name (Windows perfmon, WMI), the stanza (Windows Registry), or the name of the configuration (AD).
kind - The specific kind of input.
args - Optional arguments.
Returns:
The input that was created.

createItem

protected Input createItem(AtomEntry entry)
Creates an Input resource item.

Overrides:
createItem in class ResourceCollection<Input>
Parameters:
entry - The AtomEntry object describing the entry.
Returns:
The input that was created.

get

public Input get(java.lang.Object key)
Gets a the value of key if it exists within this collection.

Specified by:
get in interface java.util.Map<java.lang.String,Input>
Overrides:
get in class ResourceCollection<Input>
Parameters:
key - The key to look up.
Returns:
The value indexed by the key, or null if it doesn't exist.

get

public Input get(java.lang.Object key,
                 Args namespace)
Returns the value of a scoped, namespace-constrained key if it exists within this collection.

Overrides:
get in class ResourceCollection<Input>
Parameters:
key - The key to look up.
namespace - The namespace to constrain the search to.
Returns:
The value indexed by the key, or null if it doesn't exist.

itemKind

protected InputKind itemKind(java.lang.String path)
Returns the path's InputKind value.

Parameters:
path - The input path.
Returns:
The kind of input.

refresh

public InputCollection refresh()
Refreshes this input collection.

Overrides:
refresh in class ResourceCollection<Input>
Returns:
The refreshed input collection.

remove

public Input remove(java.lang.String key)
Removes an entity from this collection.

Overrides:
remove in class EntityCollection<Input>
Parameters:
key - The name of the entity to remove.
Returns:
This collection.

remove

public Input remove(java.lang.String key,
                    Args namespace)
Removes an entity from this collection, with a namespace restriction.

Overrides:
remove in class EntityCollection<Input>
Parameters:
key - The name of the entity to remove.
namespace - The namespace restriction within the collection.
Returns:
This collection.