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, 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, JobArgs args)
          Creates a search.
 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
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: You can't create a "oneshot" search using this method. Instead, use the Service.oneshotSearch(java.lang.String) method.

Overrides:
create in class EntityCollection<Job>
Parameters:
query - The search query.
Returns:
The unique search identifier (SID).

create

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

Note: You can't create a "oneshot" search using this method. Instead, use the Service.oneshotSearch(java.lang.String) method.

Overrides:
create in class EntityCollection<Job>
Parameters:
query - The search query.
args - Additional arguments for this job (see JobArgs).
Returns:
The unique search identifier (SID).

create

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

Note: You can't create a "oneshot" search using this method. Instead, use the Service.oneshotSearch(java.lang.String) method.

Parameters:
query - The search query.
args - Additional arguments for this job (see JobArgs).
Returns:
The unique search identifier (SID) for the job.

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.