@Override
	public void addAttack(Attack attack) {
		ensureInitialized();
		
		KeyValuePair keyValuePair = new KeyValuePair(KafkaConstants.ATTACK_TYPE, gson.toJson(attack));
		String message = gson.toJson(keyValuePair);
		
		try {
			kafkaSender.send(Arrays.asList(APPSENSOR_ADD_ATTACK_TOPIC), message);
		} catch (InterruptedException | ExecutionException e) {
			logger.error("Failed to send add attack message to output topic.", e);
		}
	}
@ Override public void addAttack ( Attack attack ) { ensureInitialized ( ) ; KeyValuePair keyValuePair = new KeyValuePair ( KafkaConstants . ATTACK_TYPE , gson . toJson ( attack ) ) ; String message = gson . toJson ( keyValuePair ) ; try { kafkaSender . send ( Arrays . asList ( APPSENSOR_ADD_ATTACK_TOPIC ) , message ) ; } catch ( InterruptedException | ExecutionException e ) { logger . error ( "Failed to send add attack message to output topic." , e ) ; } }
{@inheritDoc}