|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Virus scan instance interface.
The scan instance is the main interface for an external user of this API. The service "Virus Scan Provider" returns an instance of either:
The layers of this framework are:
--------- 1
| Profile |-|-
--------- |
| n ------- 1 1 ---------
--<| Group |-|- -|--| Server |
------- | | ---------
| n ---------- 1 | |
--<| Provider |-|-+ |
---------- | |
| ----+----
-|--| Adapter |
1 ----+----
|
|
------------+-----------------
| S A P NW-VSI compatible VSA |
| |
| Virus Scan Adapter (VSA) |
| External Anti Virus Product |
| from SAP AV partners |
-----------------------------
Remark:
The architecture of the Provider covers either an Adapter or a Server
(Virus Scan Server):
Eeach running thread must use its own scan instance. The reason for this is the described framework using external (native) shared libraries. There are caching mechanisms in the layer of the Provider, so the time latency of requesting an Instance is very small.
Note:
Please see the example usage of an "Instance" in the Javadoc of VSIService.
A requested instance must be released with releaseInstance.
History:
1.0 Initial Version for SAP NetWeaver 04
1.1 Added a pattern for clean test.
1.5 Enhancements in the native VSI layer
1.6 Dual runtime support (JAVA standalone and J2EE)
Profile,
Group,
Provider,
VSIService,
VSIService.getInstance()| Method Summary | |
boolean |
cleanBytes(byte[] byteArray)
Scan and clean an array of bytes. |
boolean |
cleanBytes(byte[] byteArray,
long len)
Scan and clean the length of an array of bytes. |
boolean |
cleanBytes(java.lang.String objectName,
byte[] byteArray,
long len)
Scan and clean the length of an array of bytes. |
boolean |
cleanBytes(java.lang.String objectName,
byte[] byteArray,
long len,
long jobID)
Scan and "tries to" clean the infected byte array. |
boolean |
cleanFile(java.lang.String fileName)
Scans and "tries to" clean infected files. |
boolean |
cleanFile(java.lang.String fileName,
long jobID)
Scans and "tries to" clean infected files. |
long |
getCleanedLength()
|
Infection[] |
getInfections()
Deprecated. Do not use |
long |
getJobID()
|
int |
getLastErrorRC()
Return the last occured error code. |
Parameter |
getParameter(java.lang.String paramName)
Get parameter from VSA |
Parameter[] |
getParameters()
Get all VSA parameters |
ScanError[] |
getScanErrors()
Deprecated. Do not use |
boolean |
scanBytes(byte[] byteArray)
Scan an array of bytes. |
boolean |
scanBytes(byte[] byteArray,
long len)
Scan the length of an array of bytes. |
boolean |
scanBytes(java.lang.String objectName,
byte[] byteArray,
long len)
Scan the length of an array of bytes. |
boolean |
scanBytes(java.lang.String objectName,
byte[] byteArray,
long len,
long jobID)
"Scan only" for viruses withing a passed byte array. |
boolean |
scanBytesEx(boolean doClean,
byte[] byteArray)
Extended Version of scanBytes. |
boolean |
scanBytesEx(boolean doClean,
byte[] byteArray,
long len)
Extended Version of scanBytes. |
boolean |
scanBytesEx(boolean doClean,
java.lang.String objectName,
byte[] byteArray,
long len)
Extended Version of scanBytes. |
boolean |
scanBytesEx(boolean doClean,
java.lang.String objectName,
byte[] byteArray,
long len,
long jobID)
Extended Version of scanBytes. |
boolean |
scanFile(java.lang.String fileName)
"Scans only" for viruses. |
boolean |
scanFile(java.lang.String fileName,
long jobID)
"Scans only" for viruses. |
boolean |
scanFileEx(boolean doClean,
java.lang.String fileName)
Extended Version of scanFile. |
boolean |
scanFileEx(boolean doClean,
java.lang.String fileName,
long jobID)
Extended Version of scanFile. |
void |
setActiveContent(boolean bActiveContent)
Deprecated. this method has no effect |
boolean |
setDefaultConfig()
Set or reset the default configuration of a VSA. |
void |
setJobID(long jobID)
Set the JOB identifier. |
boolean |
setParameter(Parameter vsParameter)
Set a parameter |
void |
setScanInfo(boolean bScanInfo)
|
| Method Detail |
public boolean scanFile(java.lang.String fileName,
long jobID)
throws VSIServiceException,
VirusScanException,
VirusInfectionException
fileName - The name of the file to be scanned.jobID - A freely selectable job identifier.VSIServiceException - Problems reported with this exception can be communicated to external
systems because they reflect error in the data sent by the caller.VirusScanException - Problems reported with this exception occure during a virus scan
(or clean) action. More detailed information can be retrieved by
getScanErrors.VirusInfectionException - Problems reported with this exception occure during a virus scan
(or clean) action on a found infection. More detailed information
can be retrieved by getInfections.
public boolean scanFile(java.lang.String fileName)
throws VSIServiceException,
VirusScanException,
VirusInfectionException
fileName - The name of the file to be scanned.VSIServiceException - Problems reported with this exception can be communicated to external
systems because they reflect error in the data sent by the caller.VirusScanException - Problems reported with this exception occure during a virus scan
(or clean) action. More detailed information can be retrieved by
getScanErrors.VirusInfectionException - Problems reported with this exception occure during a virus scan
(or clean) action on a found infection. More detailed information
can be retrieved by getInfections.
public boolean scanBytes(java.lang.String objectName,
byte[] byteArray,
long len,
long jobID)
throws VSIServiceException,
VirusScanException,
VirusInfectionException
objectName - Printable name of the object to be scanned.byteArray - A byte array to be scanned.len - The maximum length of the array to be scanned.jobID - A free selectable job identifier.VSIServiceException - Problems reported with this exception can be communicated to external
systems because they reflect error in the data sent by the caller.VirusScanException - Problems reported with this exception occure during a virus scan
(or clean) action. More detailed information can be retrieved by
getScanErrors.VirusInfectionException - Problems reported with this exception occure during a virus scan
(or clean) action on a found infection. More detailed information
can be retrieved by getInfections.
public boolean scanBytes(java.lang.String objectName,
byte[] byteArray,
long len)
throws VSIServiceException,
VirusScanException,
VirusInfectionException
objectName - Printable name of the object to be scanned.byteArray - Byte array.len - Length of array to be scanned.VSIServiceException - Problems reported with this exception can be communicated to external
systems because they reflect error in the data sent by the caller.VirusScanException - Problems reported with this exception occure during a virus scan
(or clean) action. More detailed information can be retrieved by
getScanErrors.VirusInfectionException - Problems reported with this exception occure during a virus scan
(or clean) action on a found infection. More detailed information
can be retrieved by getInfections.
public boolean scanBytes(byte[] byteArray,
long len)
throws VSIServiceException,
VirusScanException,
VirusInfectionException
byteArray - Byte array.len - Length of array to be scanned.VSIServiceException - Problems reported with this exception can be communicated to external
systems because they reflect error in the data sent by the caller.VirusScanException - Problems reported with this exception occure during a virus scan
(or clean) action. More detailed information can be retrieved by
getScanErrors.VirusInfectionException - Problems reported with this exception occure during a virus scan
(or clean) action on a found infection. More detailed information
can be retrieved by getInfections.
public boolean scanBytes(byte[] byteArray)
throws VSIServiceException,
VirusScanException,
VirusInfectionException
byteArray - Byte array.VSIServiceException - Problems reported with this exception can be communicated to external
systems because they reflect error in the data sent by the caller.VirusScanException - Problems reported with this exception occure during a virus scan
(or clean) action. More detailed information can be retrieved by
getScanErrors.VirusInfectionException - Problems reported with this exception occure during a virus scan
(or clean) action on a found infection. More detailed information
can be retrieved by getInfections.
public boolean scanFileEx(boolean doClean,
java.lang.String fileName,
long jobID)
throws VSIServiceException,
VirusScanException,
VirusInfectionException
doClean - True means with clean action, false is equal to scan only.fileName - The name of the file to be scanned.jobID - A free selectable job identifier.VSIServiceException - Problems reported with this exception can be communicated to external
systems because they reflect error in the data sent by the caller.VirusScanException - Problems reported with this exception occure during a virus scan
(or clean) action. More detailed information can be retrieved by
getScanErrors.VirusInfectionException - Problems reported with this exception occure during a virus scan
(or clean) action on a found infection. More detailed information
can be retrieved by getInfections.
public boolean scanFileEx(boolean doClean,
java.lang.String fileName)
throws VSIServiceException,
VirusScanException,
VirusInfectionException
doClean - True means with clean action, false is equal to scan only.fileName - The name of the file to be scanned.VSIServiceException - Problems reported with this exception can be communicated to external
systems because they reflect error in the data sent by the caller.VirusScanException - Problems reported with this exception occure during a virus scan
(or clean) action. More detailed information can be retrieved by
getScanErrors.VirusInfectionException - Problems reported with this exception occure during a virus scan
(or clean) action on a found infection. More detailed information
can be retrieved by getInfections.
public boolean scanBytesEx(boolean doClean,
java.lang.String objectName,
byte[] byteArray,
long len,
long jobID)
throws VSIServiceException,
VirusScanException,
VirusInfectionException
doClean - True means with clean action, false is equal to scan only.objectName - Printable name of the object to be scanned.byteArray - A byte array to be scanned.len - The maximum length of the array to be scanned.jobID - A free selectable job identifier.VSIServiceException - Problems reported with this exception can be communicated to external
systems because they reflect error in the data sent by the caller.VirusScanException - Problems reported with this exception occure during a virus scan
(or clean) action. More detailed information can be retrieved by
getScanErrors.VirusInfectionException - Problems reported with this exception occure during a virus scan
(or clean) action on a found infection. More detailed information
can be retrieved by getInfections.
public boolean scanBytesEx(boolean doClean,
java.lang.String objectName,
byte[] byteArray,
long len)
throws VSIServiceException,
VirusScanException,
VirusInfectionException
doClean - True means with clean action, false is equal to scan only.objectName - Printable name of the object to be scanned.byteArray - A byte array to be scanned.len - The maximum length of the array to be scanned.VSIServiceException - Problems reported with this exception can be communicated to external
systems because they reflect error in the data sent by the caller.VirusScanException - Problems reported with this exception occure during a virus scan
(or clean) action. More detailed information can be retrieved by
getScanErrors.VirusInfectionException - Problems reported with this exception occure during a virus scan
(or clean) action on a found infection. More detailed information
can be retrieved by getInfections.
public boolean scanBytesEx(boolean doClean,
byte[] byteArray,
long len)
throws VSIServiceException,
VirusScanException,
VirusInfectionException
doClean - True means with clean action, false is equal to scan only.byteArray - A byte array to be scanned.len - The maximum length of the array to be scanned.VSIServiceException - Problems reported with this exception can be communicated to external
systems because they reflect error in the data sent by the caller.VirusScanException - Problems reported with this exception occure during a virus scan
(or clean) action. More detailed information can be retrieved by
getScanErrors.VirusInfectionException - Problems reported with this exception occure during a virus scan
(or clean) action on a found infection. More detailed information
can be retrieved by getInfections.
public boolean scanBytesEx(boolean doClean,
byte[] byteArray)
throws VSIServiceException,
VirusScanException,
VirusInfectionException
doClean - True means with clean action, false is equal to scan only.byteArray - A byte array to be scanned.VSIServiceException - Problems reported with this exception can be communicated to external
systems because they reflect error in the data sent by the caller.VirusScanException - Problems reported with this exception occure during a virus scan
(or clean) action. More detailed information can be retrieved by
getScanErrors.VirusInfectionException - Problems reported with this exception occure during a virus scan
(or clean) action on a found infection. More detailed information
can be retrieved by getInfections.
public boolean cleanFile(java.lang.String fileName,
long jobID)
throws VSIServiceException,
VirusScanException,
VirusInfectionException
fileName - The name of the file to be scanned.jobID - A freely selectable job identifier.
public boolean cleanFile(java.lang.String fileName)
throws VSIServiceException,
VirusScanException,
VirusInfectionException
fileName - The name of the file to be scanned.
public boolean cleanBytes(java.lang.String objectName,
byte[] byteArray,
long len,
long jobID)
throws VSIServiceException,
VirusScanException,
VirusInfectionException
Note:
If the byte array was "infection and repaired", the array is then
smaller than before. If you want know the new length, call
getCleanedLength()
objectName - The name of the scan object.byteArray - A byte array to be scanned.len - The maximum length of the array to be scanned.jobID - A freely selectable job identifier.getCleanedLength()
public boolean cleanBytes(java.lang.String objectName,
byte[] byteArray,
long len)
throws VSIServiceException,
VirusScanException,
VirusInfectionException
objectName - Printable name of the object to be scanned.byteArray - Byte array.len - Length of array to be scanned.
public boolean cleanBytes(byte[] byteArray,
long len)
throws VSIServiceException,
VirusScanException,
VirusInfectionException
byteArray - Byte array.len - Length of array to be scanned.
public boolean cleanBytes(byte[] byteArray)
throws VSIServiceException,
VirusScanException,
VirusInfectionException
byteArray - Byte array.
public long getCleanedLength()
throws VSIServiceException,
VirusScanException
public long getJobID()
throws VSIServiceException
public void setJobID(long jobID)
public Infection[] getInfections()
throws VSIServiceException,
VirusScanException
public ScanError[] getScanErrors()
throws VSIServiceException,
VirusScanException
public int getLastErrorRC()
VSIConstansVSIConstantspublic void setScanInfo(boolean bScanInfo)
bScanInfo - Boolean flag to determine whether this detailed information
should be returned. default is truepublic void setActiveContent(boolean bActiveContent)
public boolean setParameter(Parameter vsParameter)
throws VSIServiceException
vsParameter - VSA parameter
public Parameter[] getParameters()
throws VSIServiceException
public Parameter getParameter(java.lang.String paramName)
throws VSIServiceException
paramName - Name of the param.
public boolean setDefaultConfig()
throws VSIServiceException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||