@Test(expected = RedisSerializerException.class) public void nullEventTest() throws RedisSerializerException { Serializer serializer = new LogstashSerializer(); serializer.serialize(null); }
public byte[] serialize(Event event) throws RedisSerializerException { byte[] result = null; if (event == null) { throw new RedisSerializerException("Event cannot be null"); } LogstashEvent logstashEvent = convertToLogstashEvent(event); try { result = objectMapper.writeValueAsBytes(logstashEvent); } catch (IOException e) { throw new RedisSerializerException("Could not serialize event", e); } return result; }
LogstashSerializer implements Serializer { public byte[] serialize(Event event) throws RedisSerializerException { byte[] result = null; if (event == null) { throw new RedisSerializerException("Event cannot be null"); } LogstashEvent logstashEvent = convertToLogstashEvent(event); try { result = objectMapper.writeValueAsBytes(logstashEvent); } catch (IOException e) { throw new RedisSerializerException("Could not serialize event", e); } return result; } }
LogstashSerializer implements Serializer { public byte[] serialize(Event event) throws RedisSerializerException { byte[] result = null; if (event == null) { throw new RedisSerializerException("Event cannot be null"); } LogstashEvent logstashEvent = convertToLogstashEvent(event); try { result = objectMapper.writeValueAsBytes(logstashEvent); } catch (IOException e) { throw new RedisSerializerException("Could not serialize event", e); } return result; }  }
LogstashSerializer implements Serializer { public byte[] serialize(Event event) throws RedisSerializerException { byte[] result = null; if (event == null) { throw new RedisSerializerException("Event cannot be null"); } LogstashEvent logstashEvent = convertToLogstashEvent(event); try { result = objectMapper.writeValueAsBytes(logstashEvent); } catch (IOException e) { throw new RedisSerializerException("Could not serialize event", e); } return result; }  void configure(Context context); void configure(ComponentConfiguration conf); LogstashEvent convertToLogstashEvent(Event event); byte[] serialize(Event event); }
LogstashSerializer implements Serializer { public byte[] serialize(Event event) throws RedisSerializerException { byte[] result = null; if (event == null) { throw new RedisSerializerException("Event cannot be null"); } LogstashEvent logstashEvent = convertToLogstashEvent(event); try { result = objectMapper.writeValueAsBytes(logstashEvent); } catch (IOException e) { throw new RedisSerializerException("Could not serialize event", e); } return result; }  void configure(Context context); void configure(ComponentConfiguration conf); LogstashEvent convertToLogstashEvent(Event event); byte[] serialize(Event event); static final String CONFIGURATION_TAGS_SEPARATOR; static final String HOST; static final String SOURCE; static final String SRC_PATH; static final String TIMESTAMP; static final String TYPE; static final String TAGS; static final String DEFAULT_TAGS_SEPARATOR; }