public class GelfHTTPSender extends Object implements GelfSender
POST
JSON Gelf messages to an endpoint.Constructor and Description |
---|
GelfHTTPSender(URL url,
int connectTimeoutMs,
int readTimeoutMs,
ErrorReporter errorReporter)
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the sender and free resources.
|
boolean |
sendMessage(GelfMessage message)
Send the Gelf message.
|
public GelfHTTPSender(URL url, int connectTimeoutMs, int readTimeoutMs, ErrorReporter errorReporter)
url
- target URLconnectTimeoutMs
- connection timeout in milliseconds.readTimeoutMs
- read timeout in milliseconds.errorReporter
- the error reporter.public boolean sendMessage(GelfMessage message)
GelfSender
sendMessage
in interface GelfSender
message
- the messagepublic void close()
GelfSender
close
in interface GelfSender
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2013–2023. All rights reserved.