Class HTTPServerAccessLogImporter
- java.lang.Object
-
- org.ametys.plugins.site.cache.monitoring.process.access.HTTPServerAccessLogImporter
-
- All Implemented Interfaces:
Disposable
,Component
,Configurable
,LogEnabled
,Serviceable
public class HTTPServerAccessLogImporter extends Object implements Component, Configurable, Serviceable, Disposable, LogEnabled
Import HTTP server access log and pass them to the resource access monitor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
HTTPServerAccessLogImporter.LogFileImporter
A log file importer.
-
Field Summary
Fields Modifier and Type Field Description private boolean
_enabled
protected Date
_initializationDate
Date of the initialization of the component, to ensure that only newer log entries are importerprivate List<HTTPServerAccessLogImporter.LogFileImporter>
_logFileImporters
protected Logger
_logger
Loggerprotected ResourceAccessComponent
_resourceAccessComponent
The resource access monitoring componentstatic String
ROLE
Avalon ROLE.
-
Constructor Summary
Constructors Constructor Description HTTPServerAccessLogImporter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure(Configuration configuration)
private void
configureLogFiles(Collection<String> paths)
void
dispose()
void
enableLogging(Logger logger)
private void
initializeLogFileImporters()
Initialize the log file importers.void
scanLogFiles()
Scan the log files for each site importer.void
service(ServiceManager manager)
-
-
-
Field Detail
-
_resourceAccessComponent
protected ResourceAccessComponent _resourceAccessComponent
The resource access monitoring component
-
_initializationDate
protected Date _initializationDate
Date of the initialization of the component, to ensure that only newer log entries are importer
-
_logFileImporters
private List<HTTPServerAccessLogImporter.LogFileImporter> _logFileImporters
-
_enabled
private boolean _enabled
-
-
Constructor Detail
-
HTTPServerAccessLogImporter
public HTTPServerAccessLogImporter()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
enableLogging
public void enableLogging(Logger logger)
- Specified by:
enableLogging
in interfaceLogEnabled
-
configure
public void configure(Configuration configuration) throws ConfigurationException
- Specified by:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
dispose
public void dispose()
- Specified by:
dispose
in interfaceDisposable
-
scanLogFiles
public void scanLogFiles()
Scan the log files for each site importer.
-
configureLogFiles
private void configureLogFiles(Collection<String> paths)
-
initializeLogFileImporters
private void initializeLogFileImporters()
Initialize the log file importers. This method must not be called during the initialization of the component. Instead the call should be delayed, and made during the first import attempt.
-
-