com.splunk
Class JobCollection

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

public class JobCollection
extends EntityCollection<Job>

The JobCollection class represents a collection of jobs. A job is an individual instance of a running or completed search or report, along with its related output.


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
 Job create(java.lang.String query)
          Creates a search with a UTF8 pre-encoded search request.
 Job create(java.lang.String query, java.util.Map args)
          Creates a search.
protected  java.lang.String itemKey(AtomEntry entry)
          Returns the job's unique search identifier (SID), which is used as this item's key.
 ResponseMessage list()
          Returns the job's response.
 
Methods inherited from class com.splunk.EntityCollection
remove, remove
 
Methods inherited from class com.splunk.ResourceCollection
clear, containsKey, containsKey, containsValue, createItem, createItem, entrySet, equals, get, get, hashCode, isEmpty, itemPath, keySet, put, putAll, refresh, 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

create

public Job create(java.lang.String query)
Creates a search with a UTF8 pre-encoded search request.

Note: A 'oneshot' request is invalid. To create a oneshot search, use the Service.oneshot method instead.

Overrides:
create in class EntityCollection<Job>
Parameters:
query - The search query string.
Returns:
The unique search identifier (SID).
See Also:
Service.oneshot(java.lang.String)

create

public Job create(java.lang.String query,
                  java.util.Map args)
Creates a search.

Note: A 'oneshot' request is invalid. To create a oneshot search, use the Service.oneshot method instead.

Overrides:
create in class EntityCollection<Job>
Parameters:
query - The search query string.
args - Additional arguments for this job.
Returns:
The unique search identifier (SID).
See Also:
Service.oneshot(java.lang.String)

list

public ResponseMessage list()
Returns the job's response.

Overrides:
list in class ResourceCollection<Job>
Returns:
The job's response.

itemKey

protected java.lang.String itemKey(AtomEntry entry)
Returns the job's unique search identifier (SID), which is used as this item's key.

Overrides:
itemKey in class ResourceCollection<Job>
Parameters:
entry - The AtomEntry response.
Returns:
This job's SID.