Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement