public class ConvertToEvent extends Object
Modifier and Type | Field and Description |
---|---|
protected static String |
HIDDEN_MESSAGE
Constant
HIDDEN_MESSAGE="The message logged has been removed due"{trunked} |
Constructor and Description |
---|
ConvertToEvent(String systemId,
String location,
InetAddress addr,
int port,
ByteBuffer incoming,
Date receivedTimestamp,
SyslogdConfig config)
Constructs a new event encapsulation instance based upon the
information passed to the method.
|
ConvertToEvent(String systemId,
String location,
InetAddress addr,
int port,
ByteBuffer incoming,
SyslogdConfig config)
Constructs a new event encapsulation instance based upon the
information passed to the method.
|
Modifier and Type | Method and Description |
---|---|
Event |
getEvent()
getEvent
|
static EventBuilder |
toEventBuilder(SyslogMessage message,
String systemId,
String location) |
static EventBuilder |
toEventBuilder(SyslogMessage message,
String systemId,
String location,
Date receivedTimestamp) |
String |
toString()
toString
|
static ByteBuffer |
trimTrailingNulls(ByteBuffer original)
Reduce the limit of the buffer to trim trailing nulls from the value.
|
protected static final String HIDDEN_MESSAGE
HIDDEN_MESSAGE="The message logged has been removed due"{trunked}
public ConvertToEvent(String systemId, String location, InetAddress addr, int port, ByteBuffer incoming, SyslogdConfig config) throws MessageDiscardedException
StandardCharsets.US_ASCII
character encoding.systemId
- location
- addr
- The remote agent's address.port
- The remote agent's portincoming
- The syslog datagram in StandardCharsets.US_ASCII
encoding.config
- The Syslogd configurationMessageDiscardedException
public ConvertToEvent(String systemId, String location, InetAddress addr, int port, ByteBuffer incoming, Date receivedTimestamp, SyslogdConfig config) throws MessageDiscardedException
StandardCharsets.US_ASCII
character encoding.systemId
- location
- addr
- The remote agent's address.port
- The remote agent's portincoming
- The syslog datagram in StandardCharsets.US_ASCII
encoding.receivedTimestamp
- the time the message was receivedconfig
- The Syslogd configurationMessageDiscardedException
public static ByteBuffer trimTrailingNulls(ByteBuffer original)
buffer
- ByteBuffer
representing the trimmed value.public static final EventBuilder toEventBuilder(SyslogMessage message, String systemId, String location)
public static final EventBuilder toEventBuilder(SyslogMessage message, String systemId, String location, Date receivedTimestamp)
Copyright © 2021. All rights reserved.