<commit_before>package com.boundary.sdk.event.snmp;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.boundary.sdk.event.RawEvent;
import com.boundary.sdk.event.UDPRouteBuilder;

/**
 * Route builder that receives SNMP messages into {@link RawEvent}
 * and then sends to Boundary event route.
 * 
 * @author davidg
 *
 */
public class SNMPRouteBuilder extends UDPRouteBuilder {
	
	private static Logger LOG = LoggerFactory.getLogger(SNMPRouteBuilder.class);
	
	private final int DEFAULT_SNMP_PORT=162;
	
	private String mibRepositoryPath;
	private String license;

	/**
	 * Default constructor
	 */
	public SNMPRouteBuilder() {
		this.port = DEFAULT_SNMP_PORT;
		this.mibRepositoryPath="";
		this.license = "";
	}
	
	/**
	 * Sets the path to the directory
	 * to the compiled MIBs.
	 * 
	 * @param path File path to directory
	 */
	public void setMibRepository(String path) {
		this.mibRepositoryPath = path;
	}
	
	/**
	 * Returns the currently configured path
	 * to the compiled MIBs
	 * 
	 * @return {@link String} with the path to the MIB repository
	 */
	public String getMibRepository() {
		return this.mibRepositoryPath;
	}
	
	/**
	 * Sets the SNMP4J-SMI license key
	 * 
	 * @param license {@link String} containing the license
	 */
	public void setLicense(String license) {
		this.license = license;
	}
	
	/**
	 * Returns the current value of the SNMP4J-SMI license key
	 * 
	 * @return {@link String} contain the configured license key
	 */
	public String getLicense() {
		return this.license;
	}
	
	/**
	 * Configuration for the SNMP route 
	 */
	@Override
	public void configure() {
		String uri = "snmp:" + getBindAddress() + ":" + getPort() + "?protocol=udp&type=TRAP";
		from(uri)
		.startupOrder(startUpOrder)
		.routeId(this.routeId)
		.to("log:com.boundary.sdk.event.snmp.SNMPRouteBuilder?level=DEBUG&showBody=true&showHeaders=true")
		.process(new SNMPToEventProcessor(mibRepositoryPath,license))
		.marshal().serialization()
		.to(toUri)
		;
	}
}
<commit_msg>Made protected<commit_after>package com.boundary.sdk.event.snmp;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.boundary.sdk.event.RawEvent;
import com.boundary.sdk.event.UDPRouteBuilder;

/**
 * Route builder that receives SNMP messages into {@link RawEvent}
 * and then sends to Boundary event route.
 * 
 * @author davidg
 *
 */
public class SNMPRouteBuilder extends UDPRouteBuilder {
	
	private static Logger LOG = LoggerFactory.getLogger(SNMPRouteBuilder.class);
	
	private final int DEFAULT_SNMP_PORT=162;
	
	protected String mibRepositoryPath;
	protected String license;

	/**
	 * Default constructor
	 */
	public SNMPRouteBuilder() {
		this.port = DEFAULT_SNMP_PORT;
		this.mibRepositoryPath="";
		this.license = "";
	}
	
	/**
	 * Sets the path to the directory
	 * to the compiled MIBs.
	 * 
	 * @param path File path to directory
	 */
	public void setMibRepository(String path) {
		this.mibRepositoryPath = path;
	}
	
	/**
	 * Returns the currently configured path
	 * to the compiled MIBs
	 * 
	 * @return {@link String} with the path to the MIB repository
	 */
	public String getMibRepository() {
		return this.mibRepositoryPath;
	}
	
	/**
	 * Sets the SNMP4J-SMI license key
	 * 
	 * @param license {@link String} containing the license
	 */
	public void setLicense(String license) {
		this.license = license;
	}
	
	/**
	 * Returns the current value of the SNMP4J-SMI license key
	 * 
	 * @return {@link String} contain the configured license key
	 */
	public String getLicense() {
		return this.license;
	}
	
	/**
	 * Configuration for the SNMP route 
	 */
	@Override
	public void configure() {
		String uri = "snmp:" + getBindAddress() + ":" + getPort() + "?protocol=udp&type=TRAP";
		from(uri)
		.startupOrder(startUpOrder)
		.routeId(this.routeId)
		.to("log:com.boundary.sdk.event.snmp.SNMPRouteBuilder?level=DEBUG&showBody=true&showHeaders=true")
		.process(new SNMPToEventProcessor(mibRepositoryPath,license))
		.marshal().serialization()
		.to(toUri)
		;
	}
}

{'fraction_non_alphanumeric': 0.11241568823382463, 'fraction_numerical': 0.0034973769672745443, 'mean_word_length': 3.824096385542169, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4554654', 'n_tokens_mistral': 1393, 'n_tokens_neox': 1261, 'n_words': 331}