Package org.opends.server.loggers
Interface LogPublisher<T extends LogPublisherCfg>
-
- Type Parameters:
T
- The type of log publisher configuration handled by this log publisher implementation.
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Implementing Classes:
AccessLogPublisher
,ConsoleErrorLogPublisher
,ErrorLogPublisher
,HTTPAccessLogPublisher
,TextAccessLogPublisher
,TextAuditLogPublisher
,TextErrorLogPublisher
,TextHTTPAccessLogPublisher
@PublicAPI(stability=VOLATILE, mayExtend=true) public interface LogPublisher<T extends LogPublisherCfg> extends Closeable
This class defines the set of methods and structures that must be implemented for a Directory Server log publisher.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Close this publisher.Dn
getDN()
Gets the DN of the configuration entry for this log publisher.void
initializeLogPublisher(T config, ServerContext serverContext)
Initializes this publisher provider based on the information in the provided debug publisher configuration.boolean
isConfigurationAcceptable(T configuration, List<LocalizableMessage> unacceptableReasons)
Indicates whether the provided configuration is acceptable for this log publisher.
-
-
-
Method Detail
-
initializeLogPublisher
void initializeLogPublisher(T config, ServerContext serverContext) throws ConfigException, InitializationException
Initializes this publisher provider based on the information in the provided debug publisher configuration.- Parameters:
config
- The publisher configuration that contains the information to use to initialize this publisher.serverContext
- The server context.- Throws:
ConfigException
- If an unrecoverable problem arises in the process of performing the initialization as a result of the server configuration.InitializationException
- If a problem occurs during initialization that is not related to the server configuration.
-
isConfigurationAcceptable
boolean isConfigurationAcceptable(T configuration, List<LocalizableMessage> unacceptableReasons)
Indicates whether the provided configuration is acceptable for this log publisher. It should be possible to call this method on an uninitialized log publisher instance in order to determine whether the log publisher would be able to use the provided configuration.- Parameters:
configuration
- The log publisher configuration for which to make the determination.unacceptableReasons
- A list that may be used to hold the reasons that the provided configuration is not acceptable.- Returns:
true
if the provided configuration is acceptable for this log publisher, orfalse
if not.
-
close
void close()
Close this publisher.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
getDN
Dn getDN()
Gets the DN of the configuration entry for this log publisher.- Returns:
- The configuration entry DN.
-
-