org.springframework.integration.transformer
Class SyslogToMapTransformer
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.transformer.AbstractTransformer
org.springframework.integration.transformer.AbstractPayloadTransformer <java.lang.Object,java.util.Map<java.lang.String,?>>
org.springframework.integration.transformer.SyslogToMapTransformer
All Implemented Interfaces: org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, NamedComponent , Transformer
public class SyslogToMapTransformer extends AbstractPayloadTransformer <java.lang.Object,java.util.Map<java.lang.String,?>>
Transforms a packet in Syslog (RFC5424) format to a Map.
If the packet cannot be decoded, the entire packet
is returned as a String under the key UNDECODED. If the date field can be
parsed, it will be returned as a Date
object; otherwise it is returned as a String.
Since:
2.2
Author:
Gary Russell
Field Summary
static java.lang.String
FACILITY
static java.lang.String
HOST
static java.lang.String
MESSAGE
static java.lang.String
SEVERITY
static java.lang.String
TAG
static java.lang.String
TIMESAMP
static java.lang.String
UNDECODED
Method Summary
protected java.util.Map<java.lang.String,?>
transformPayload (java.lang.Object payload)
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet , getBeanFactory , getComponentName , getComponentType , getConversionService , getTaskScheduler , onInit , setBeanFactory , setBeanName , setComponentName , setConversionService , setTaskScheduler , toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
FACILITY
public static final java.lang.String FACILITY
See Also: Constant Field Values
SEVERITY
public static final java.lang.String SEVERITY
See Also: Constant Field Values
TIMESAMP
public static final java.lang.String TIMESAMP
See Also: Constant Field Values
HOST
public static final java.lang.String HOST
See Also: Constant Field Values
TAG
public static final java.lang.String TAG
See Also: Constant Field Values
MESSAGE
public static final java.lang.String MESSAGE
See Also: Constant Field Values
UNDECODED
public static final java.lang.String UNDECODED
See Also: Constant Field Values
SyslogToMapTransformer
public SyslogToMapTransformer ()
transformPayload
protected java.util.Map<java.lang.String,?> transformPayload (java.lang.Object payload)
throws java.lang.Exception
Specified by: transformPayload
in class AbstractPayloadTransformer <java.lang.Object,java.util.Map<java.lang.String,?>>
Throws:
java.lang.Exception