Package com.avoka.fc.core.service.impl
Class ClamAVVirusScanService
java.lang.Object
com.avoka.fc.core.service.BaseService
com.avoka.fc.core.service.impl.ClamAVVirusScanService
- All Implemented Interfaces:
IServiceDefinitionAware
,IVirusScanService
public class ClamAVVirusScanService
extends BaseService
implements IVirusScanService, IServiceDefinitionAware
Provides an ClamAV Scan Engine Virus Scan Service.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturn the service definition for the service.Gets the timeout.boolean
isFileVirusFree
(String filename, byte[] fileData) Scan the provided file using Clam AV server and return true if virus free.void
setServiceDefinition
(ServiceDefinition serviceDefinition) Set the service definition for the service.void
setTimeout
(Integer timeout) Sets the timeout.Methods inherited from class com.avoka.fc.core.service.BaseService
getLogger
-
Constructor Details
-
ClamAVVirusScanService
public ClamAVVirusScanService()
-
-
Method Details
-
isFileVirusFree
Scan the provided file using Clam AV server and return true if virus free.- Specified by:
isFileVirusFree
in interfaceIVirusScanService
- Parameters:
filename
- the name of the file to scanfileData
- the file data- Returns:
- true if the file is virus free
- Throws:
VirusScanException
- if there occurs a virus scan service configuration error- See Also:
-
getServiceDefinition
Return the service definition for the service.- Specified by:
getServiceDefinition
in interfaceIServiceDefinitionAware
- Returns:
- the service definition for the service.
- See Also:
-
setServiceDefinition
Set the service definition for the service.- Specified by:
setServiceDefinition
in interfaceIServiceDefinitionAware
- Parameters:
serviceDefinition
- the service definition for the service.- See Also:
-
getTimeout
Gets the timeout.- Returns:
- the timeout
-
setTimeout
Sets the timeout.- Parameters:
timeout
- the new timeout
-