Package io.airlift.event.client.http
Class HttpEventClient
- java.lang.Object
-
- io.airlift.event.client.http.HttpEventClient
-
- All Implemented Interfaces:
EventClient
public class HttpEventClient extends Object implements EventClient
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.airlift.event.client.EventClient
EventClient.EventGenerator<T extends Object>, EventClient.EventPoster<T extends Object>
-
-
Constructor Summary
Constructors Constructor Description HttpEventClient(HttpServiceSelector serviceSelector, JsonEventWriter eventWriter, NodeInfo nodeInfo, HttpClient httpClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RequestStatsgetStats()<T> com.google.common.util.concurrent.ListenableFuture<Void>post(EventClient.EventGenerator<T> eventGenerator)<T> com.google.common.util.concurrent.ListenableFuture<Void>post(Iterable<T> events)<T> com.google.common.util.concurrent.ListenableFuture<Void>post(T... event)
-
-
-
Constructor Detail
-
HttpEventClient
@Inject public HttpEventClient(HttpServiceSelector serviceSelector, JsonEventWriter eventWriter, NodeInfo nodeInfo, HttpClient httpClient)
-
-
Method Detail
-
getStats
public RequestStats getStats()
-
post
@SafeVarargs public final <T> com.google.common.util.concurrent.ListenableFuture<Void> post(T... event) throws IllegalArgumentException
- Specified by:
postin interfaceEventClient- Throws:
IllegalArgumentException
-
post
public <T> com.google.common.util.concurrent.ListenableFuture<Void> post(Iterable<T> events) throws IllegalArgumentException
- Specified by:
postin interfaceEventClient- Throws:
IllegalArgumentException
-
post
public <T> com.google.common.util.concurrent.ListenableFuture<Void> post(EventClient.EventGenerator<T> eventGenerator)
- Specified by:
postin interfaceEventClient
-
-