Package com.splunk.logging
Class HttpEventCollectorErrorHandler
- java.lang.Object
-
- com.splunk.logging.HttpEventCollectorErrorHandler
-
public class HttpEventCollectorErrorHandler extends Object
Splunk http event collector error handler. A user application can utilize HttpEventCollectorErrorHandler in order to detect errors caused by network connection and/or Splunk server. Usage example: HttpEventCollectorErrorHandler.onError(new HttpEventCollectorErrorHandler.ErrorCallback() { public void error(final String data, final Exception ex) { // handle exception } });
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
HttpEventCollectorErrorHandler.ErrorCallback
static class
HttpEventCollectorErrorHandler.ServerErrorException
This exception is passed to error callback when Splunk server replies an error
-
Constructor Summary
Constructors Constructor Description HttpEventCollectorErrorHandler()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
error(List<HttpEventCollectorEventInfo> data, Exception ex)
Report an exceptionstatic void
onError(HttpEventCollectorErrorHandler.ErrorCallback callback)
Register error callbacks
-
-
-
Method Detail
-
onError
public static void onError(HttpEventCollectorErrorHandler.ErrorCallback callback)
Register error callbacks- Parameters:
callback
- ErrorCallback
-
error
public static void error(List<HttpEventCollectorEventInfo> data, Exception ex)
Report an exception- Parameters:
data
- eventdataex
- is an exception thrown by posting or processing data
-
-