public class SyslogDestination extends Object implements Destination
Modifier and Type | Class and Description |
---|---|
static class |
SyslogDestination.SyslogFacility
The Enumeration SyslogFacility.
|
static class |
SyslogDestination.SyslogProtocol
The Enumeration SyslogProtocol.
|
Constructor and Description |
---|
SyslogDestination()
Instantiates a new Syslog destination.
|
SyslogDestination(String name,
SyslogDestination.SyslogProtocol protocol,
SyslogDestination.SyslogFacility facility)
Instantiates a new Syslog destination.
|
Modifier and Type | Method and Description |
---|---|
String |
getCharSet()
Gets the char set.
|
String |
getCustomMessageFormat(NorthboundAlarm alarm)
Gets the custom message format.
|
SyslogDestination.SyslogFacility |
getFacility()
Gets the facility.
|
List<SyslogFilter> |
getFilters()
Gets the filters.
|
String |
getHost()
Gets the host.
|
Integer |
getMaxMessageLength()
Gets the max message length.
|
String |
getName()
Gets the destination name.
|
Integer |
getPort()
Gets the port.
|
SyslogDestination.SyslogProtocol |
getProtocol()
Gets the protocol.
|
boolean |
isFirstOccurrenceOnly()
Checks if is first occurrence only.
|
Boolean |
isSendLocalName()
Checks if is send local name flag.
|
Boolean |
isSendLocalTime()
Checks if is send local time flag.
|
Boolean |
isTruncateMessage()
Checks if is truncate message flag.
|
boolean |
passFilter(NorthboundAlarm alarm)
Pass filter.
|
void |
setCharSet(String charSet)
Sets the char set.
|
void |
setFilters(List<SyslogFilter> filters)
Sets the filters.
|
void |
setFirstOccurrenceOnly(Boolean firstOccurrenceOnly)
Sets the first occurrence only.
|
void |
setHost(String m_host)
Sets the host.
|
void |
setMaxMessageLength(Integer maxMessageLength)
Sets the max message length.
|
void |
setName(String name)
Sets the name.
|
void |
setPort(Integer m_port)
Sets the port.
|
void |
setProtocol(SyslogDestination.SyslogProtocol m_protocol)
Sets the protocol.
|
void |
setSendLocalName(Boolean sendLocalName)
Sets the send local name flag.
|
void |
setSendLocalTime(Boolean sendLocalTime)
Sets the send local time flag.
|
void |
setTruncateMessage(Boolean truncateMessage)
Sets the truncate message flag.
|
public SyslogDestination()
public SyslogDestination(String name, SyslogDestination.SyslogProtocol protocol, SyslogDestination.SyslogFacility facility)
name
- the nameprotocol
- the protocolfacility
- the facilitypublic String getName()
Destination
getName
in interface Destination
public void setName(String name)
name
- the new namepublic String getHost()
public void setHost(String m_host)
m_host
- the new hostpublic Integer getPort()
public void setPort(Integer m_port)
m_port
- the new portpublic SyslogDestination.SyslogProtocol getProtocol()
public void setProtocol(SyslogDestination.SyslogProtocol m_protocol)
m_protocol
- the new protocolpublic SyslogDestination.SyslogFacility getFacility()
public String getCharSet()
public void setCharSet(String charSet)
charSet
- the new char setpublic Integer getMaxMessageLength()
public void setMaxMessageLength(Integer maxMessageLength)
maxMessageLength
- the new max message lengthpublic Boolean isSendLocalName()
public void setSendLocalName(Boolean sendLocalName)
sendLocalName
- the new send local name flagpublic Boolean isSendLocalTime()
public void setSendLocalTime(Boolean sendLocalTime)
sendLocalTime
- the new send local time flagpublic Boolean isTruncateMessage()
public void setTruncateMessage(Boolean truncateMessage)
truncateMessage
- the new truncate message flagpublic boolean isFirstOccurrenceOnly()
Destination
isFirstOccurrenceOnly
in interface Destination
public void setFirstOccurrenceOnly(Boolean firstOccurrenceOnly)
firstOccurrenceOnly
- the new first occurrence onlypublic List<SyslogFilter> getFilters()
public void setFilters(List<SyslogFilter> filters)
filters
- the new filterspublic boolean passFilter(NorthboundAlarm alarm)
If the destination doesn't have filter, the method will return true.
If the method has filters, they will be evaluated. If no filters are satisfied, the method will return false. Otherwise, the method will return true as soon as one filter is satisfied.
alarm
- the alarmpublic String getCustomMessageFormat(NorthboundAlarm alarm)
alarm
- the alarmCopyright © 2021. All rights reserved.