/**
 * 
 */
package com.boundary.sdk;

import java.util.Date;

import org.apache.camel.CamelContext;
import org.apache.camel.Exchange;
import org.apache.camel.Message;
import org.apache.camel.Processor;
import org.apache.camel.component.syslog.SyslogMessage;
import org.apache.camel.component.syslog.SyslogSeverity;

import com.boundary.sdk.RawEvent;
import com.boundary.sdk.Severity;


/**
 * @author davidg
 * 
 */
public class SNMPToEventProcessor implements Processor {

	private boolean debug = false;
	/**
	 * 
	 */
	
	public SNMPToEventProcessor() {
		this(false);
	}
	public SNMPToEventProcessor(boolean debug) {
		// TODO Auto-generated constructor stub
	}
	
	private final String CAMEL_SYSLOG_HOSTNAME = "CamelSyslogHostname";
	private final String CAMEL_SYSLOG_SEVERITY = "CamelSyslogSeverity";

	@Override
	public void process(Exchange exchange) throws Exception {
		// Get the CamelContext and Message
		CamelContext context = exchange.getContext();
		Message message = exchange.getIn();
		
		// Create our event so that we can populate with the Syslog data
		RawEvent event = new RawEvent();
		event = event.getDefaultEvent();
		Date dt = new java.util.Date();
		event.setTitle("SNMP TRAP " + dt);
		event.setSeverity(Severity.CRITICAL);
		
		// Delegate to member method call to perform the translation
		//this.translateSyslogMessage(message, event);
		message.setBody(event, RawEvent.class);
	}
}

@@ -211,51 +211,20 @@
 org.
-apache.camel.component.syslog.SyslogMessa
+slf4j.Log
 ge
+r
 ;%0Aim
@@ -236,51 +236,26 @@
 org.
-apache.camel.component.syslog.SyslogSeverit
+slf4j.LoggerFactor
 y;%0A%0A
@@ -411,26 +411,30 @@
 essor %7B%0A
-%0A
 %09
+%0A    
 private 
 boolean 
@@ -429,56 +429,58 @@
 ate 
-boolean debug = false;%0A%09/**%0A%09 * %0A%09 */%0A%09%0A%09public 
+static final Logger LOG = LoggerFactory.getLogger(
 SNMP
@@ -499,30 +499,18 @@
 ssor
-() %7B%0A%09%09this(false
+.class
 );%0A%09
-%7D
 %0A%09pu
@@ -539,402 +539,188 @@
 sor(
-boolean debug) %7B%0A%09%09// TODO Auto-generated constructor stub%0A%09%7D%0A%09%0A%09private final String CAMEL_SYSLOG_HOSTNAME = %22CamelSyslogHostname%22;%0A%09private final String CAMEL_SYSLOG_SEVERITY = %22CamelSyslogSeverity%22;%0A%0A%09@Override%0A%09public void process(Exchange exchange) throws Exception %7B%0A%09%09// Get the CamelContext and Message%0A%09%09CamelContext context = exchange.getContext();%0A%09%09Message message = exchange.getIn(
+) %7B%0A%09%7D%0A%09%0A%09@Override%0A%09public void process(Exchange exchange) throws Exception %7B%0A%09%09Message message = exchange.getIn();%0A%09%09LOG.debug(%22class: %7B%7D%22,message.getBody().getClass().toString()
 );%0A%09
@@ -827,43 +827,8 @@
 ();%0A
-%09%09event = event.getDefaultEvent();%0A
 %09%09Da
@@ -857,16 +857,19 @@
 Date();%0A
+%09%09%0A
 %09%09event.
@@ -913,150 +913,298 @@
 setS
-everity(Severity.CRITICAL);%0A%09%09%0A%09%09// Delegate to member method call to perform the translation%0A%09%09//this.translateSyslogM
+tatus(Status.OPEN);%0A%09%09event.setSeverity(Severity.WARN);%0A%09%09event.getSource().setRef(%22localhost%22);%0A%09%09event.getSource().setType(%22host%22);%0A//%09%09event.setMessage(message.getBody().toString());%0A//%09%09event.putProperty(%22m
 essage
-(
+%22,
 message
-, event);
+.getBody().toString());%0A%09%09event.putFingerprintField(%22@title%22);%0A%09%09
 %0A%09%09m

Remove dead code from SNMP event processing