Package com.splunk.logging
Class HttpEventCollectorMiddleware
java.lang.Object
com.splunk.logging.HttpEventCollectorMiddleware
public class HttpEventCollectorMiddleware extends Object
Splunk http event collector middleware implementation.
A user application can utilize HttpEventCollectorMiddleware to customize the behavior
of sending events to Splunk. A user application plugs middleware components to
the HttpEventCollectorSender by calling addMiddleware method.
HttpEventCollectorResendMiddleware.java is an example of how middleware can be used.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HttpEventCollectorMiddleware.HttpSenderMiddleware
An abstract middleware component.static interface
HttpEventCollectorMiddleware.IHttpSender
An interface that describes an abstract events sender working asynchronously.static interface
HttpEventCollectorMiddleware.IHttpSenderCallback
Callback methods invoked by events sender. -
Constructor Summary
Constructors Constructor Description HttpEventCollectorMiddleware()
-
Method Summary
Modifier and Type Method Description void
add(HttpEventCollectorMiddleware.HttpSenderMiddleware middleware)
Plug a middleware component to the middleware chain.void
postEvents(List<HttpEventCollectorEventInfo> events, HttpEventCollectorMiddleware.IHttpSender sender, HttpEventCollectorMiddleware.IHttpSenderCallback callback)
Post http event collector data
-
Constructor Details
-
HttpEventCollectorMiddleware
public HttpEventCollectorMiddleware()
-
-
Method Details
-
postEvents
public void postEvents(List<HttpEventCollectorEventInfo> events, HttpEventCollectorMiddleware.IHttpSender sender, HttpEventCollectorMiddleware.IHttpSenderCallback callback)Post http event collector data- Parameters:
events
- listsender
- is http sendercallback
- async callback
-
add
Plug a middleware component to the middleware chain.- Parameters:
middleware
- is a new middleware
-