public class

LogglyRetrieveConnectorRestClientAdapter

extends LogglyRetrieveConnectorProcessAdapter
implements MuleContextAware Disposable Initialisable
java.lang.Object
   ↳ org.mule.modules.loggly.LogglyRetrieveConnector
     ↳ org.mule.modules.loggly.adapters.LogglyRetrieveConnectorCapabilitiesAdapter
       ↳ org.mule.modules.loggly.adapters.LogglyRetrieveConnectorMetadataAdapater
         ↳ org.mule.modules.loggly.adapters.LogglyRetrieveConnectorLifecycleAdapter
           ↳ org.mule.modules.loggly.adapters.LogglyRetrieveConnectorProcessAdapter
             ↳ org.mule.modules.loggly.adapters.LogglyRetrieveConnectorRestClientAdapter

Summary

[Expand]
Inherited Constants
From class org.mule.modules.loggly.adapters.LogglyRetrieveConnectorMetadataAdapater
From class org.mule.modules.loggly.LogglyRetrieveConnector
From interface org.mule.api.lifecycle.Disposable
From interface org.mule.api.lifecycle.Initialisable
From interface org.mule.api.lifecycle.Startable
From interface org.mule.api.lifecycle.Stoppable
Fields
private HttpMuleMessageFactory httpMuleMessageFactory
private MuleContext muleContext
private int responseTimeout
[Expand]
Inherited Fields
From class org.mule.modules.loggly.LogglyRetrieveConnector
Public Constructors
LogglyRetrieveConnectorRestClientAdapter()
Public Methods
void addCurrentDevice(int id)
Add the current machine as a device to an existing input

void addCurrentDeviceToSyslog514(int id)
Add the current machine with Syslog 514 UDP as a device to an existing input

void addDevice(Integer id, String ip, String deviceName)
Adds a device to an input

void createInput(String inputName, String description, Service service)
Create an input

void deleteDevice(int id)
Deletes a Device from an Input

void deleteDeviceByIp(String ip)
Deletes a Device (identified by an IP address) from an Input

Device device(int id)
Get a device by id

Collection<Device> devices()
Get all the Devices

void disableInputDiscovery(int id)
Disables discovery mode on the device

void enableInputDiscovery(int id)
Puts the Input in discovery mode

LogglyFacetResult facet(String query, FacetType facetType, int buckets, String gap, String from, String until)
Provides faceted results from an account on either date, ip, or input fields.
void initialise()
Input input(int id)
Fetch an input for an account using its id.
Input inputByName(String inputName)
Fetch an input for an account using its name.
Collection<Input> inputs()
Fetch all the inputs associated with the account.
void removeDevice(int id)
Remove Device from Input

LogglyResultSet search(String query, int rows, int start, String from, String until, Order order)
Searches for a log message.
void setMuleContext(MuleContext context)
void setResponseTimeout(int value)
Sets responseTimeout
[Expand]
Inherited Methods
From class org.mule.modules.loggly.adapters.LogglyRetrieveConnectorProcessAdapter
From class org.mule.modules.loggly.adapters.LogglyRetrieveConnectorLifecycleAdapter
From class org.mule.modules.loggly.adapters.LogglyRetrieveConnectorMetadataAdapater
From class org.mule.modules.loggly.adapters.LogglyRetrieveConnectorCapabilitiesAdapter
From class org.mule.modules.loggly.LogglyRetrieveConnector
From class java.lang.Object
From interface org.mule.api.Capabilities
From interface org.mule.api.MetadataAware
From interface org.mule.api.context.MuleContextAware
From interface org.mule.api.lifecycle.Disposable
From interface org.mule.api.lifecycle.Initialisable
From interface org.mule.api.lifecycle.Startable
From interface org.mule.api.lifecycle.Stoppable
From interface org.mule.api.process.ProcessAdapter

Fields

private HttpMuleMessageFactory httpMuleMessageFactory

private MuleContext muleContext

private int responseTimeout

Public Constructors

public LogglyRetrieveConnectorRestClientAdapter ()

Public Methods

public void addCurrentDevice (int id)

Add the current machine as a device to an existing input

Parameters
id Input ID
Throws
IOException

public void addCurrentDeviceToSyslog514 (int id)

Add the current machine with Syslog 514 UDP as a device to an existing input

Parameters
id Device ID
Returns
  • Input input
Throws
IOException

public void addDevice (Integer id, String ip, String deviceName)

Adds a device to an input

Parameters
id Input ID where to attach the device
ip IP Address of the device
deviceName Name of the device
Throws
IOException

public void createInput (String inputName, String description, Service service)

Create an input

Parameters
inputName Name
description Description
service Service to use
Throws
IOException

public void deleteDevice (int id)

Deletes a Device from an Input

Parameters
id Device ID to remove
Throws
IOException

public void deleteDeviceByIp (String ip)

Deletes a Device (identified by an IP address) from an Input

Parameters
ip IP Address of the Device to remove
Throws
IOException

public Device device (int id)

Get a device by id

Parameters
id Device to retrieve
Returns
  • devices
Throws
IOException

public Collection<Device> devices ()

Get all the Devices

Returns
  • devices
Throws
IOException

public void disableInputDiscovery (int id)

Disables discovery mode on the device

Parameters
id Device ID
Returns
  • Input input
Throws
IOException

public void enableInputDiscovery (int id)

Puts the Input in discovery mode

Parameters
id Device ID
Returns
  • Input input
Throws
IOException

public LogglyFacetResult facet (String query, FacetType facetType, int buckets, String gap, String from, String until)

Provides faceted results from an account on either date, ip, or input fields. Facets return counts of events over a time range.

Parameters
query String to search in logs.
facetType Facet type to use.
buckets Number of buckets the results are split into for a given time range. Defaults to 50.
gap Set the gap time between buckets. Defaults to +1HOUR
from Start time for the search. Defaults to NOW-1HOUR.
until End time for the search. Defaults to NOW.
Returns
  • Facet results
Throws
IOException

public void initialise ()

Throws
InitialisationException

public Input input (int id)

Fetch an input for an account using its id. Without id

Parameters
id Id of the input
Returns
  • Input input
Throws
IOException

public Input inputByName (String inputName)

Fetch an input for an account using its name.

Parameters
inputName Name of the input
Returns
  • Input input
Throws
IOException

public Collection<Input> inputs ()

Fetch all the inputs associated with the account.

Returns
  • Input input
Throws
IOException

public void removeDevice (int id)

Remove Device from Input

Parameters
id Device ID
Throws
IOException

public LogglyResultSet search (String query, int rows, int start, String from, String until, Order order)

Searches for a log message.

Parameters
query String to search in logs.
rows Number of rows returned by search. Defaults to 10, maximum of 2000.
start Offset for starting row. Defaults to 0.
from Start time for the search. Defaults to NOW-24HOURS.
until End time for the search. Defaults to NOW.
order Direction of results returned, either 'asc' or 'desc'. Defaults to 'desc'.
Returns
  • Search results
Throws
IOException

public void setMuleContext (MuleContext context)

Parameters
context

public void setResponseTimeout (int value)

Sets responseTimeout

Parameters
value Value to set