public interface DashboardProvider
All implementations will be return raw string data received from Graphite instance. Dashboard parsing operation falls on user.
Interface methods throws GraphiteOperationException if operation was failed in some reason.
For example, bad request format, incorrect connection settings, Graphite instance not response, etc.
| Modifier and Type | Method and Description |
|---|---|
void |
delete(java.lang.String name)
Delete dashboard from Graphite instance.
|
java.util.List<java.lang.String> |
find(java.lang.String query)
Find dashboards in Graphite instance that match query.
|
java.lang.String |
load(java.lang.String name)
Load dashboard with specified name from Graphite instance.
|
org.ametiste.gdc.data.dashboard.Dashboard |
load(java.lang.String name,
com.google.gson.JsonDeserializer<org.ametiste.gdc.data.dashboard.Dashboard> deserializer)
Load dashboard with specified name from Graphite instance.
|
void |
save(java.lang.String name,
java.lang.String dashboard)
Save dashboard in Graphite instance or create new if dashboard with target name not exists.
|
void save(java.lang.String name,
java.lang.String dashboard)
throws GraphiteOperationException
name - dashboard name.dashboard - dashboard description. Must be valid json structure that describe dashboard structure.GraphiteOperationException - when error occurred during communication with Graphite instance or
Graphite return error response.java.lang.String load(java.lang.String name)
throws GraphiteOperationException
name - name of target dashboard.GraphiteOperationException - when error occurred during communication with Graphite instance
or Graphite returns response with error massage (in most cases that dashboard not found).
In last case exception contains message from response.org.ametiste.gdc.data.dashboard.Dashboard load(java.lang.String name,
com.google.gson.JsonDeserializer<org.ametiste.gdc.data.dashboard.Dashboard> deserializer)
throws GraphiteOperationException
name - name of target dashboard.deserializer - JsonDeserializer object that helps deserialize string description to
Dashboard object.Dashboard object that represents json description.GraphiteOperationException - when error occurred during communication with Graphite instance
or Graphite returns response with error massage (in most cases that dashboard not found).
In last case exception contains message from response. Also exception may be throws when returned json string
has wrong syntax.void delete(java.lang.String name)
throws GraphiteOperationException
name - name of dashboard to delete.GraphiteOperationException - when error occurred during communication with Graphite instance or
if dashboard with specified name not exists.java.util.List<java.lang.String> find(java.lang.String query)
throws GraphiteOperationException
query - query string for filtering search result. Query contains phrases separated by whitespace.
Result list will contain only those dashboards that contains all phases from query.List of dashboards names that match query. If no dashboards match method returns
empty list.GraphiteOperationException - when error occurred during communication with Graphite instance.