com.splunk
Class Receiver

java.lang.Object
  extended by com.splunk.Receiver

public class Receiver
extends java.lang.Object

The Receiver class represents a named index and unnamed index receivers.


Method Summary
 java.net.Socket attach()
          Creates a writable socket to this index.
 java.net.Socket attach(Args args)
          Creates a writable socket to this index.
 java.net.Socket attach(java.lang.String indexName)
          Creates a writable socket to this index.
 java.net.Socket attach(java.lang.String indexName, Args args)
          Creates a writable socket to this index.
 void log(Args args, java.lang.String data)
          Submits an event to this index through HTTP POST.
 void log(java.lang.String data)
          Submits an event to this index through HTTP POST.
 void log(java.lang.String indexName, Args args, java.lang.String data)
          Logs an event to this index through HTTP POST.
 void log(java.lang.String indexName, java.lang.String data)
          Submits an event to this index through HTTP POST.
 void submit(Args args, java.lang.String data)
          Submits an event to this index through HTTP POST.
 void submit(java.lang.String data)
          Submits an event to this index through HTTP POST.
 void submit(java.lang.String indexName, Args args, java.lang.String data)
          Logs an event to this index through HTTP POST.
 void submit(java.lang.String indexName, java.lang.String data)
          Submits an event to this index through HTTP POST.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

attach

public java.net.Socket attach()
                       throws java.io.IOException
Creates a writable socket to this index.

Returns:
The socket.
Throws:
java.io.IOException

attach

public java.net.Socket attach(java.lang.String indexName)
                       throws java.io.IOException
Creates a writable socket to this index.

Parameters:
indexName - The index to write to.
Returns:
The socket.
Throws:
java.io.IOException

attach

public java.net.Socket attach(Args args)
                       throws java.io.IOException
Creates a writable socket to this index.

Parameters:
args - Optional arguments for this stream. Valid parameters are: "host", "host_regex", "source", and "sourcetype".
Returns:
The socket.
Throws:
java.io.IOException

attach

public java.net.Socket attach(java.lang.String indexName,
                              Args args)
                       throws java.io.IOException
Creates a writable socket to this index.

Parameters:
indexName - The index to write to.
args - Optional arguments for this stream. Valid parameters are: "host", "host_regex", "source", and "sourcetype".
Returns:
The socket.
Throws:
java.io.IOException

submit

public void submit(java.lang.String data)
Submits an event to this index through HTTP POST.

Parameters:
data - A string containing event data.

submit

public void submit(java.lang.String indexName,
                   java.lang.String data)
Submits an event to this index through HTTP POST.

Parameters:
indexName - The index to write to.
data - A string containing event data.

submit

public void submit(Args args,
                   java.lang.String data)
Submits an event to this index through HTTP POST.

Parameters:
data - A string containing event data.
args - Optional arguments for this stream. Valid parameters are: "host", "host_regex", "source", and "sourcetype".

submit

public void submit(java.lang.String indexName,
                   Args args,
                   java.lang.String data)
Logs an event to this index through HTTP POST.

Parameters:
indexName - The index to write to.
data - A string containing event data.
args - Optional arguments for this stream. Valid parameters are: "host", "host_regex", "source", and "sourcetype".

log

public void log(java.lang.String data)
Submits an event to this index through HTTP POST. This method is an alias for submit().

Parameters:
data - A string containing event data.

log

public void log(java.lang.String indexName,
                java.lang.String data)
Submits an event to this index through HTTP POST. This method is an alias for submit().

Parameters:
indexName - The index to write to.
data - A string containing event data.

log

public void log(Args args,
                java.lang.String data)
Submits an event to this index through HTTP POST. This method is an alias for submit().

Parameters:
args - Optional arguments for this stream. Valid parameters are: "host", "host_regex", "source", and "sourcetype".
data - A string containing event data.

log

public void log(java.lang.String indexName,
                Args args,
                java.lang.String data)
Logs an event to this index through HTTP POST. This method is an alias for submit().

Parameters:
indexName - The index to write to.
args - Optional arguments for this stream. Valid parameters are: "host", "host_regex", "source", and "sourcetype".
data - A string containing event data.