Package org.graylog2.plugin
Interface MessageFactory
public interface MessageFactory
-
Method Summary
Modifier and TypeMethodDescriptionstatic MessageReturns a fakeMessage.createMessage(String message, String source, org.joda.time.DateTime timestamp) Returns a newMessageobject for the given fields.createMessage(String id, Map<String, Object> newFields) Returns a newMessageobject for the given ID and fields.createMessage(Map<String, Object> fields) Returns a newMessageobject for the given fields map.
-
Method Details
-
createMessage
Returns a newMessageobject for the given fields.- Parameters:
message- the message field valuesource- the source field valuetimestamp- the timestamp field value- Returns:
- the new message object
-
createMessage
Returns a newMessageobject for the given fields map.- Parameters:
fields- the map of fields- Returns:
- the new message object
-
createMessage
Returns a newMessageobject for the given ID and fields.- Parameters:
id- the message IDnewFields- the map of fields- Returns:
- the new message object
-
createFakeMessage
Returns a fakeMessage. This message must not be used for real message processing!- Returns:
- a fake message
-