public final class GelfSenderFactory extends Object
GelfSender
based on the host and protocol details. This factory uses Java's ServiceLoader
mechanism to discover classes implementing GelfSenderProvider
.Modifier and Type | Method and Description |
---|---|
static void |
addGelfSenderProvider(GelfSenderProvider provider) |
static GelfSender |
createSender(GelfSenderConfiguration senderConfiguration)
Create a GelfSender based on the configuration.
|
static GelfSender |
createSender(HostAndPortProvider hostAndPortProvider,
ErrorReporter errorReporter,
Map<String,Object> senderSpecificConfigurations)
Create a GelfSender based on the configuration.
|
static void |
removeAllAddedSenderProviders() |
static void |
removeGelfSenderProvider(GelfSenderProvider provider) |
public static GelfSender createSender(HostAndPortProvider hostAndPortProvider, ErrorReporter errorReporter, Map<String,Object> senderSpecificConfigurations)
hostAndPortProvider
- the host and porterrorReporter
- the error reportersenderSpecificConfigurations
- configuration mapGelfSender
instancepublic static GelfSender createSender(GelfSenderConfiguration senderConfiguration)
senderConfiguration
- the configurationGelfSender
instancepublic static void addGelfSenderProvider(GelfSenderProvider provider)
public static void removeGelfSenderProvider(GelfSenderProvider provider)
public static void removeAllAddedSenderProviders()
Copyright © 2013–2023. All rights reserved.