public class HttpMonitoringExporterClient extends Object implements Closeable
Modifier and Type | Field and Description |
---|---|
static String |
API_KEY |
static String |
BASIC |
static String |
BEARER |
static String |
HTTPS |
Constructor and Description |
---|
HttpMonitoringExporterClient(String remoteBaseUrl,
String basicAuthent,
String token,
String apiKey,
String endpoint,
boolean keepConnection,
io.netty.channel.EventLoopGroup group)
Note that only one among (basicAuthent, token, apikey) is allowed and
will be taken into account.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
isKeepConnection() |
boolean |
post(com.fasterxml.jackson.databind.node.ObjectNode monitoredTransfers,
org.joda.time.DateTime start,
org.joda.time.DateTime stop,
String serverId) |
void |
setStatus(boolean ok) |
public static final String HTTPS
public static final String BASIC
public static final String BEARER
public static final String API_KEY
public HttpMonitoringExporterClient(String remoteBaseUrl, String basicAuthent, String token, String apiKey, String endpoint, boolean keepConnection, io.netty.channel.EventLoopGroup group)
remoteBaseUrl
- as 'http://myhost.com:8080' or 'https://myhost.com:8443'basicAuthent
- Basic Authent in Base64 format to connect to
REST API if any (Basic authentication from 'username:paswwd')
(nullable)token
- access token (Bearer Token authorization
by Header) (nullable)apiKey
- API Key (Base64 of 'apiId:apiKey') (ApiKey authorization
by Header) (nullable)endpoint
- as '/waarpr66monitor' or simply '/'keepConnection
- True to keep the connexion opened, False to release the connexion each timegroup
- the EventLoopGroup to usepublic final boolean post(com.fasterxml.jackson.databind.node.ObjectNode monitoredTransfers, org.joda.time.DateTime start, org.joda.time.DateTime stop, String serverId)
monitoredTransfers
- the Json objet to push as POSTstart
- the DateTime for the 'from' intervalstop
- the DateTime for the 'to' intervalserverId
- the serverId that is sending this monitoring informationpublic final boolean isKeepConnection()
public final void setStatus(boolean ok)
public final void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2009–2022 Waarp. All rights reserved.