Class SplunkConnectionImpl
java.lang.Object
org.apache.calcite.adapter.splunk.search.SplunkConnectionImpl
- All Implemented Interfaces:
SplunkConnection
Implementation of
SplunkConnection
based on Splunk's REST API.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Implementation ofSearchResultListener
interface that just counts the results.static class
Implementation ofEnumerator
that parses results from a Splunk REST call. -
Constructor Summary
ConstructorsConstructorDescriptionSplunkConnectionImpl
(String url, String username, String password) SplunkConnectionImpl
(URL url, String username, String password) -
Method Summary
Modifier and TypeMethodDescriptiongetSearchResultEnumerator
(String search, Map<String, String> otherArgs, @Nullable List<String> fieldList) void
getSearchResults
(String search, Map<String, String> otherArgs, @Nullable List<String> fieldList, SearchResultListener srl) static void
static void
static void
printUsage
(String errorMsg)
-
Constructor Details
-
SplunkConnectionImpl
public SplunkConnectionImpl(String url, String username, String password) throws MalformedURLException - Throws:
MalformedURLException
-
SplunkConnectionImpl
-
-
Method Details
-
getSearchResults
public void getSearchResults(String search, Map<String, String> otherArgs, @Nullable List<String> fieldList, SearchResultListener srl) - Specified by:
getSearchResults
in interfaceSplunkConnection
-
getSearchResultEnumerator
public Enumerator<Object> getSearchResultEnumerator(String search, Map<String, String> otherArgs, @Nullable List<String> fieldList) - Specified by:
getSearchResultEnumerator
in interfaceSplunkConnection
-
parseArgs
-
printUsage
-
main
- Throws:
MalformedURLException
-