Class HTTPServerResourceAccess
- java.lang.Object
-
- org.ametys.plugins.site.cache.monitoring.process.access.impl.HTTPServerResourceAccess
-
- All Implemented Interfaces:
ResourceAccess
public class HTTPServerResourceAccess extends Object implements ResourceAccess
Apache resource access. Represent an access to a resource from Apache. These objects are created will parsing the Apache access logs.
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.Logger
_LOGGER
logger
-
Constructor Summary
Constructors Modifier Constructor Description protected
HTTPServerResourceAccess(Map<org.ametys.plugins.site.cache.monitoring.process.access.impl.HTTPServerResourceAccess.Field,Object> params)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HTTPServerResourceAccess
createRecord(String entry, DateFormat df)
Create a new record instanceString
getInsertStatementId()
Retrieves the name of the SQL statement to call.Map<String,Object>
getInsertStatementParameters()
Retrieves the map of parameters to use when executing the insert statement.boolean
isOfInterest(Date date)
Indicates if this record should be persisted in the database.String
toString()
-
-
-
Field Detail
-
_LOGGER
protected static final org.slf4j.Logger _LOGGER
logger
-
-
Constructor Detail
-
HTTPServerResourceAccess
protected HTTPServerResourceAccess(Map<org.ametys.plugins.site.cache.monitoring.process.access.impl.HTTPServerResourceAccess.Field,Object> params)
Constructor- Parameters:
params
- the parameters used
-
-
Method Detail
-
createRecord
public static HTTPServerResourceAccess createRecord(String entry, DateFormat df)
Create a new record instance- Parameters:
entry
- the server access log entrydf
- the date format to use for the record- Returns:
- the created record
-
getInsertStatementId
public String getInsertStatementId()
Description copied from interface:ResourceAccess
Retrieves the name of the SQL statement to call.- Specified by:
getInsertStatementId
in interfaceResourceAccess
- Returns:
- The name of the SQL statement to call.
-
getInsertStatementParameters
public Map<String,Object> getInsertStatementParameters()
Description copied from interface:ResourceAccess
Retrieves the map of parameters to use when executing the insert statement.- Specified by:
getInsertStatementParameters
in interfaceResourceAccess
- Returns:
- The map of parameters
-
isOfInterest
public boolean isOfInterest(Date date)
Indicates if this record should be persisted in the database. If it returns false, it means that this record must be filtered out and must not be inserted into the database.- Parameters:
date
- The date at which the httpserver log importer has been started.- Returns:
- True is this record is newer than the date passed as an argument.
-
-