code: private EventType createEventType(EventEnumType type) {
          EventType eventType = new EventType();
          eventType.setTimestamp(Converter.convertDate(new Date()));
          eventType.setEventType(type);
  
          OriginatorType origType = new OriginatorType();
          origType.setProcessId(Converter.getPID());
          try {
              InetAddress inetAddress = InetAddress.getLocalHost();
              origType.setIp(inetAddress.getHostAddress());
              origType.setHostname(inetAddress.getHostName());
          } catch (UnknownHostException e) {
              origType.setHostname("Unknown hostname");
              origType.setIp("Unknown ip address");
          }
          eventType.setOriginator(origType);
  
          String path = System.getProperty("karaf.home");
          CustomInfoType ciType = new CustomInfoType();
          CustomInfoType.Item cItem = new CustomInfoType.Item();
          cItem.setKey("path");
          cItem.setValue(path);
          ciType.getItem().add(cItem);
          eventType.setCustomInfo(ciType);
  
          return eventType;
      }
docs: Creates the event type.
  
  @param type the EventEnumType
  @return the event type