The addObject(String, Supplier) can be used to allow objects to be set when configuring error managers,
handlers, filters and formatters.
If the supplier os not already an instance of a ConfigurationResource, then it is
wrapped and considered a lazy resource.
| Modifier and Type | Field and Description |
|---|---|
| private final LogContext | |
| public static final Logger. | |
| private final Map | |
| private final Map | |
| private final Map | |
| private final Map | |
| private final Map |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public ConfigurationResource | Returns: the previous error manager associated with the name ornull if one did not existthe name for the error manager name, final Supplier<ErrorManager> the error manager to add errorManager)Adds an error manager to the context configuration. |
| public ConfigurationResource | |
| public ConfigurationResource | Returns: the previous formatter associated with the name ornull if one did not existthe name for the formatter name, final Supplier<Formatter> the formatter to add formatter)Adds a formatter to the context configuration. |
| public ConfigurationResource | Returns: the previous handler associated with the name ornull if one did not existthe name for the handler name, final Supplier<Handler> the handler to add handler)Adds a handler to the context configuration. |
| public ConfigurationResource | Returns: the previous configuration object associated with the name ornull if one did not existthe name for the configuration object name, final Supplier<Object> the configuration object to add object)Adds an object that can be used as a configuration property for another configuration type. |
| public void | close()
Implements java. Closes this resource, relinquishing any underlying resources. |
| private static void | |
| public LogContext | |
| public ErrorManager | Returns: the error manager ornull if the error manager does not existthe name of the error manager name)Gets the error manager if it exists. |
| public Map | Returns: an unmodified map of the error managersReturns an unmodifiable map of the error managers and the suppliers used to create them. |
| public Filter | |
| public Map | Returns: an unmodified map of the filtersReturns an unmodifiable map of the filters and the suppliers used to create them. |
| public Formatter | Returns: the formatter ornull if the formatter does not existthe name of the formatter name)Gets the formatter if it exists. |
| public Map | Returns: an unmodified map of the formattersReturns an unmodifiable map of the formatters and the suppliers used to create them. |
| public Handler | Returns: the handler ornull if the handler does not existthe name of the handler name)Gets the handler if it exists. |
| public Map | Returns: an unmodified map of the handlersReturns an unmodifiable map of the handlers and the suppliers used to create them. |
| public Logger | |
| public Set | Returns: an unmodified set of the logger namesReturns an unmodifiable set of the configured logger names |
| public Object | |
| public Map | Returns: an unmodified map of the configuration objectsReturns an unmodifiable map of the configuration objects and the suppliers used to create them. |
| public boolean | Returns: true if the error manager exists in this context, otherwise falsethe name for the error manager name)Checks if the error manager exists with the name provided. |
| public boolean | |
| public boolean | Returns: true if the formatter exists in this context, otherwise falsethe name for the formatter name)Checks if the formatter exists with the name provided. |
| public boolean | Returns: true if the handler exists in this context, otherwise falsethe name for the handler name)Checks if the handler exists with the name provided. |
| public boolean | |
| public boolean | |
| public ConfigurationResource | Returns: the error manager removed ornull if the error manager did not existthe name of the error manager name)Removes the error manager from the context configuration. |
| public ConfigurationResource | Returns: the filter removed ornull if the filter did not existthe name of the filter name)Removes the filter from the context configuration. |
| public ConfigurationResource | Returns: the formatter removed ornull if the formatter did not existthe name of the formatter name)Removes the formatter from the context configuration. |
| public ConfigurationResource | Returns: the handler removed ornull if the handler did not existthe name of the handler name)Removes the handler from the context configuration. |
| public ConfigurationResource | Returns: the configuration object removed ornull if the configuration object did not existthe name of the configuration object name)Removes the configuration object from the context configuration. |
| context | back to summary |
|---|---|
| private final LogContext context | |
| CONTEXT_CONFIGURATION_KEY | back to summary |
|---|---|
| public static final Logger. | |
| errorManagers | back to summary |
|---|---|
| private final Map<String, ConfigurationResource<ErrorManager>> errorManagers | |
| filters | back to summary |
|---|---|
| private final Map<String, ConfigurationResource<Filter>> filters | |
| formatters | back to summary |
|---|---|
| private final Map<String, ConfigurationResource<Formatter>> formatters | |
| handlers | back to summary |
|---|---|
| private final Map<String, ConfigurationResource<Handler>> handlers | |
| objects | back to summary |
|---|---|
| private final Map<String, ConfigurationResource<Object>> objects | |
| ContextConfiguration | back to summary |
|---|---|
| public ContextConfiguration(final LogContext context) Creates a new context configuration. | |
| addErrorManager | back to summary |
|---|---|
| public ConfigurationResource Adds an error manager to the context configuration.
| |
| addFilter | back to summary |
|---|---|
| public ConfigurationResource Adds a filter to the context configuration.
| |
| addFormatter | back to summary |
|---|---|
| public ConfigurationResource Adds a formatter to the context configuration.
| |
| addHandler | back to summary |
|---|---|
| public ConfigurationResource Adds a handler to the context configuration.
| |
| addObject | back to summary |
|---|---|
| public ConfigurationResource Adds an object that can be used as a configuration property for another configuration type. This is used for cases when an object cannot simply be converted from a string.
| |
| close | back to summary |
|---|---|
| public void close() throws Exception Implements java. Doc from java. Closes this resource, relinquishing any underlying resources.
This method is invoked automatically on objects managed by the
| |
| closeResources | back to summary |
|---|---|
| private static void closeResources(final Map<String, ? extends ConfigurationResource<?>> resources) | |
| getContext | back to summary |
|---|---|
| public LogContext getContext() Returns the context for this configuration.
| |
| getErrorManager | back to summary |
|---|---|
| public ErrorManager getErrorManager(final String name) Gets the error manager if it exists.
| |
| getErrorManagers | back to summary |
|---|---|
| public Map Returns an unmodifiable map of the error managers and the suppliers used to create them.
| |
| getFilter | back to summary |
|---|---|
| public Filter getFilter(final String name) Gets the filter if it exists. | |
| getFilters | back to summary |
|---|---|
| public Map Returns an unmodifiable map of the filters and the suppliers used to create them.
| |
| getFormatter | back to summary |
|---|---|
| public Formatter getFormatter(final String name) Gets the formatter if it exists. | |
| getFormatters | back to summary |
|---|---|
| public Map Returns an unmodifiable map of the formatters and the suppliers used to create them. | |
| getHandler | back to summary |
|---|---|
| public Handler getHandler(final String name) Gets the handler if it exists. | |
| getHandlers | back to summary |
|---|---|
| public Map Returns an unmodifiable map of the handlers and the suppliers used to create them.
| |
| getLogger | back to summary |
|---|---|
| public Logger getLogger(final String name) Gets the logger if it exists. | |
| getLoggers | back to summary |
|---|---|
| public Set Returns an unmodifiable set of the configured logger names | |
| getObject | back to summary |
|---|---|
| public Object getObject(final String name) Gets the configuration object if it exists. | |
| getObjects | back to summary |
|---|---|
| public Map Returns an unmodifiable map of the configuration objects and the suppliers used to create them.
| |
| hasErrorManager | back to summary |
|---|---|
| public boolean hasErrorManager(final String name) Checks if the error manager exists with the name provided.
| |
| hasFilter | back to summary |
|---|---|
| public boolean hasFilter(final String name) Checks if the filter exists with the name provided.
| |
| hasFormatter | back to summary |
|---|---|
| public boolean hasFormatter(final String name) Checks if the formatter exists with the name provided.
| |
| hasHandler | back to summary |
|---|---|
| public boolean hasHandler(final String name) Checks if the handler exists with the name provided.
| |
| hasLogger | back to summary |
|---|---|
| public boolean hasLogger(final String name) Checks if the logger exists in this context.
| |
| hasObject | back to summary |
|---|---|
| public boolean hasObject(final String name) Checks if the configuration object exists with the name provided.
| |
| removeErrorManager | back to summary |
|---|---|
| public ConfigurationResource Removes the error manager from the context configuration.
| |
| removeFilter | back to summary |
|---|---|
| public ConfigurationResource Removes the filter from the context configuration.
| |
| removeFormatter | back to summary |
|---|---|
| public ConfigurationResource Removes the formatter from the context configuration.
| |
| removeHandler | back to summary |
|---|---|
| public ConfigurationResource Removes the handler from the context configuration.
| |
| removeObject | back to summary |
|---|---|
| public ConfigurationResource Removes the configuration object from the context configuration.
| |