@Override
public void publishAlert(String type, String key, String message,
HttpRequest request, IHttpResponse response,
Object... properties) {
debug("Publishing Alert: ("+ type +") ["+ request.getRequestLine().getUri() +"] ");
final IRequestLog requestLog = workspace.getRequestLog();
synchronized(scanInstance) {
if(key != null && scanInstance.hasAlertKey(key)) {
return;
}
final long requestId = requestLog.addRequestResponse(response);
final IScanAlert alert = scanInstance.createAlert(type, key, requestId);
for(int i = 0; (i + 1) < properties.length; i += 2) {
if(properties[i] instanceof String) {
alert.setProperty((String) properties[i], properties[i + 1]);