SHARE
TWEET

Untitled

a guest Jul 18th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.ptamba.plugins;
  2.  
  3. import java.util.List;
  4. import java.util.Iterator;
  5.  
  6. import com.arcsight.event.ISecurityEvent;
  7. import com.arcsight.product.manager.extension.event.api.ICustomEventHandler;
  8.  
  9. public class GeoHandler implements ICustomEventHandler {
  10.  
  11.     @Override
  12.     public void onPostPersist(List<ISecurityEvent> arg0) {
  13.         // TODO Auto-generated method stub
  14.  
  15.     }
  16.  
  17.     @Override
  18.     public void onPrePersist(List<ISecurityEvent> events) {
  19.         // TODO Auto-generated method stub
  20.         for(Iterator<ISecurityEvent>i = events.iterator(); i.hasNext();) {
  21.             ISecurityEvent event = i.next();
  22.             // if event.Name starts with Hello
  23.             if(event.getName().startsWith("Hello!")) {
  24.                 // set event.DeviceCustomString1 to Hello World!
  25.                 event.setDeviceCustomString1("Hello world!");
  26.             }
  27.         }
  28.        
  29.     }
  30.  
  31. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top