Package org.opennms.netmgt.syslogd
Class SyslogSinkModule
- java.lang.Object
-
- org.opennms.core.ipc.sink.xml.AbstractXmlSinkModule<SyslogConnection,SyslogMessageLogDTO>
-
- org.opennms.netmgt.syslogd.SyslogSinkModule
-
- All Implemented Interfaces:
SinkModule<SyslogConnection,SyslogMessageLogDTO>
public class SyslogSinkModule extends AbstractXmlSinkModule<SyslogConnection,SyslogMessageLogDTO>
-
-
Field Summary
Fields Modifier and Type Field Description static String
MODULE_ID
-
Fields inherited from interface org.opennms.core.ipc.sink.api.SinkModule
HEARTBEAT_MODULE_ID
-
-
Constructor Summary
Constructors Constructor Description SyslogSinkModule(SyslogdConfig config, DistPollerDao distPollerDao)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
AggregationPolicy<SyslogConnection,SyslogMessageLogDTO,SyslogMessageLogDTO>
getAggregationPolicy()
Defines how messages should be combined, and when they should be "released".AsyncPolicy
getAsyncPolicy()
Defines how messages should be asynchronously dispatched.String
getId()
Globally unique identifier.int
getNumConsumerThreads()
The number of threads used to consume from the broker.int
hashCode()
SyslogMessageLogDTO
toMessageLog(SyslogConnection... connections)
Used for testing.SyslogConnection
unmarshalSingleMessage(byte[] bytes)
Modules with different aggregated message should override this method-
Methods inherited from class org.opennms.core.ipc.sink.xml.AbstractXmlSinkModule
marshal, marshalSingleMessage, unmarshal
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opennms.core.ipc.sink.api.SinkModule
getRoutingKey
-
-
-
-
Field Detail
-
MODULE_ID
public static final String MODULE_ID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SyslogSinkModule
public SyslogSinkModule(SyslogdConfig config, DistPollerDao distPollerDao)
-
-
Method Detail
-
getId
public String getId()
Description copied from interface:SinkModule
Globally unique identifier. Used in the JMS queue name in the Camel implementation.
-
getNumConsumerThreads
public int getNumConsumerThreads()
Description copied from interface:SinkModule
The number of threads used to consume from the broker.
-
getAggregationPolicy
public AggregationPolicy<SyslogConnection,SyslogMessageLogDTO,SyslogMessageLogDTO> getAggregationPolicy()
Description copied from interface:SinkModule
Defines how messages should be combined, and when they should be "released". Modules that do not wish to use aggregation can returnnull
.- Returns:
- the
AggregationPolicy
used to combine messages, ornull
if the messages should not be combined.
-
getAsyncPolicy
public AsyncPolicy getAsyncPolicy()
Description copied from interface:SinkModule
Defines how messages should be asynchronously dispatched.- Returns:
- the
AsyncPolicy
used when asynchronously dispatching messages for this module.
-
unmarshalSingleMessage
public SyslogConnection unmarshalSingleMessage(byte[] bytes)
Description copied from class:AbstractXmlSinkModule
Modules with different aggregated message should override this method- Specified by:
unmarshalSingleMessage
in interfaceSinkModule<SyslogConnection,SyslogMessageLogDTO>
- Overrides:
unmarshalSingleMessage
in classAbstractXmlSinkModule<SyslogConnection,SyslogMessageLogDTO>
-
toMessageLog
public SyslogMessageLogDTO toMessageLog(SyslogConnection... connections)
Used for testing.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractXmlSinkModule<SyslogConnection,SyslogMessageLogDTO>
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classAbstractXmlSinkModule<SyslogConnection,SyslogMessageLogDTO>
-
-