Package org.opennms.netmgt.model
Class OnmsMonitoredService
- java.lang.Object
-
- org.opennms.netmgt.model.OnmsEntity
-
- org.opennms.netmgt.model.OnmsMonitoredService
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<OnmsMonitoredService>
@Entity public class OnmsMonitoredService extends OnmsEntity implements java.io.Serializable, java.lang.Comparable<OnmsMonitoredService>
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.Map<java.lang.String,java.lang.String>
STATUS_MAP
-
Constructor Summary
Constructors Constructor Description OnmsMonitoredService()
Constructor for OnmsMonitoredService.OnmsMonitoredService(OnmsIpInterface ipIf, OnmsServiceType serviceType)
Constructor for OnmsMonitoredService.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
addApplication(OnmsApplication application)
addApplicationvoid
addMetaData(java.lang.String context, java.lang.String key, java.lang.String value)
int
compareTo(OnmsMonitoredService o)
compareTojava.util.Optional<OnmsMetaData>
findMetaDataForContextAndKey(java.lang.String context, java.lang.String key)
java.util.Set<OnmsApplication>
getApplications()
getApplicationsjava.util.Set<OnmsOutage>
getCurrentOutages()
getCurrentOutagesjava.lang.String
getForeignId()
java.lang.String
getForeignSource()
java.lang.Integer
getId()
Unique identifier for ifService.java.lang.Integer
getIfIndex()
getIfIndexjava.net.InetAddress
getIpAddress()
getIpAddressjava.lang.String
getIpAddressAsString()
Deprecated.OnmsIpInterface
getIpInterface()
getIpInterfacejava.lang.Integer
getIpInterfaceId()
java.lang.Integer
getJsonId()
java.util.Date
getLastFail()
getLastFailjava.util.Date
getLastGood()
getLastGoodjava.util.List<OnmsMetaData>
getMetaData()
java.lang.Integer
getNodeId()
getNodeIdjava.lang.String
getNotify()
getNotifyjava.lang.String
getQualifier()
getQualifierjava.lang.Integer
getServiceId()
getServiceIdjava.lang.String
getServiceName()
getServiceNameOnmsServiceType
getServiceType()
getServiceTypejava.lang.String
getSource()
getSourcejava.lang.String
getStatus()
getStatusjava.lang.String
getStatusLong()
java.lang.String
getXmlId()
This id is used for the serialized representation such as json, xml etc.boolean
isDown()
isDownvoid
mergeMetaData(OnmsMonitoredService scanned)
void
mergeServiceAttributes(OnmsMonitoredService scanned)
mergeServiceAttributesboolean
removeApplication(OnmsApplication application)
removeApplicationvoid
removeMetaData(java.lang.String context)
void
removeMetaData(java.lang.String context, java.lang.String key)
void
setApplications(java.util.Set<OnmsApplication> applications)
setApplicationsvoid
setCurrentOutages(java.util.Set<OnmsOutage> currentOutages)
setCurrentOutagesvoid
setId(java.lang.Integer id)
setIdvoid
setIpInterface(OnmsIpInterface ipInterface)
setIpInterfacevoid
setLastFail(java.util.Date lastfail)
setLastFailvoid
setLastGood(java.util.Date lastgood)
setLastGoodvoid
setMetaData(java.util.List<OnmsMetaData> metaData)
void
setNotify(java.lang.String notify)
setNotifyvoid
setQualifier(java.lang.String qualifier)
setQualifiervoid
setServiceType(OnmsServiceType service)
setServiceTypevoid
setSource(java.lang.String source)
setSourcevoid
setStatus(java.lang.String status)
setStatusvoid
setXmlId(java.lang.String id)
java.lang.String
toString()
toStringvoid
visit(EntityVisitor visitor)
visit-
Methods inherited from class org.opennms.netmgt.model.OnmsEntity
hasNewValue
-
-
-
-
Constructor Detail
-
OnmsMonitoredService
public OnmsMonitoredService()
Constructor for OnmsMonitoredService.
-
OnmsMonitoredService
public OnmsMonitoredService(OnmsIpInterface ipIf, OnmsServiceType serviceType)
Constructor for OnmsMonitoredService.
- Parameters:
ipIf
- aOnmsIpInterface
object.serviceType
- aOnmsServiceType
object.
-
-
Method Detail
-
getId
public java.lang.Integer getId()
Unique identifier for ifService.- Returns:
- a
Integer
object.
-
getJsonId
public java.lang.Integer getJsonId()
-
setId
public void setId(java.lang.Integer id)
setId
- Parameters:
id
- aInteger
object.
-
getXmlId
public java.lang.String getXmlId()
This id is used for the serialized representation such as json, xml etc.
-
setXmlId
public void setXmlId(java.lang.String id)
-
getIpAddress
public java.net.InetAddress getIpAddress()
getIpAddress
- Returns:
- a
String
object.
-
getIpAddressAsString
public java.lang.String getIpAddressAsString()
Deprecated.getIpAddress
- Returns:
- a
String
object.
-
getIfIndex
public java.lang.Integer getIfIndex()
getIfIndex
- Returns:
- a
Integer
object.
-
getLastGood
public java.util.Date getLastGood()
getLastGood
- Returns:
- a
Date
object.
-
setLastGood
public void setLastGood(java.util.Date lastgood)
setLastGood
- Parameters:
lastgood
- aDate
object.
-
getLastFail
public java.util.Date getLastFail()
getLastFail
- Returns:
- a
Date
object.
-
setLastFail
public void setLastFail(java.util.Date lastfail)
setLastFail
- Parameters:
lastfail
- aDate
object.
-
getQualifier
public java.lang.String getQualifier()
getQualifier
- Returns:
- a
String
object.
-
setQualifier
public void setQualifier(java.lang.String qualifier)
setQualifier
- Parameters:
qualifier
- aString
object.
-
getStatus
public java.lang.String getStatus()
getStatus
- Returns:
- a
String
object.
-
setStatus
public void setStatus(java.lang.String status)
setStatus
- Parameters:
status
- aString
object.
-
getStatusLong
public java.lang.String getStatusLong()
-
getSource
public java.lang.String getSource()
getSource
- Returns:
- a
String
object.
-
setSource
public void setSource(java.lang.String source)
setSource
- Parameters:
source
- aString
object.
-
getNotify
public java.lang.String getNotify()
getNotify
- Returns:
- a
String
object.
-
setNotify
public void setNotify(java.lang.String notify)
setNotify
- Parameters:
notify
- aString
object.
-
getMetaData
public java.util.List<OnmsMetaData> getMetaData()
-
setMetaData
public void setMetaData(java.util.List<OnmsMetaData> metaData)
-
addMetaData
public void addMetaData(java.lang.String context, java.lang.String key, java.lang.String value)
-
removeMetaData
public void removeMetaData(java.lang.String context, java.lang.String key)
-
removeMetaData
public void removeMetaData(java.lang.String context)
-
findMetaDataForContextAndKey
public java.util.Optional<OnmsMetaData> findMetaDataForContextAndKey(java.lang.String context, java.lang.String key)
-
getIpInterface
public OnmsIpInterface getIpInterface()
getIpInterface
- Returns:
- a
OnmsIpInterface
object.
-
getIpInterfaceId
public java.lang.Integer getIpInterfaceId()
-
setIpInterface
public void setIpInterface(OnmsIpInterface ipInterface)
setIpInterface
- Parameters:
ipInterface
- aOnmsIpInterface
object.
-
getNodeId
public java.lang.Integer getNodeId()
getNodeId
- Returns:
- a
Integer
object.
-
getServiceType
public OnmsServiceType getServiceType()
getServiceType
- Returns:
- a
OnmsServiceType
object.
-
setServiceType
public void setServiceType(OnmsServiceType service)
setServiceType
- Parameters:
service
- aOnmsServiceType
object.
-
toString
public java.lang.String toString()
toString
- Overrides:
toString
in classjava.lang.Object
- Returns:
- a
String
object.
-
getServiceId
public java.lang.Integer getServiceId()
getServiceId
- Returns:
- a
Integer
object.
-
visit
public void visit(EntityVisitor visitor)
visit
- Specified by:
visit
in classOnmsEntity
- Parameters:
visitor
- aEntityVisitor
object.
-
getServiceName
public java.lang.String getServiceName()
getServiceName
- Returns:
- a
String
object.
-
isDown
public boolean isDown()
isDown
- Returns:
- a boolean.
-
getCurrentOutages
public java.util.Set<OnmsOutage> getCurrentOutages()
getCurrentOutages
- Returns:
- a
Set
object.
-
setCurrentOutages
public void setCurrentOutages(java.util.Set<OnmsOutage> currentOutages)
setCurrentOutages
- Parameters:
currentOutages
- aSet
object.
-
getApplications
public java.util.Set<OnmsApplication> getApplications()
getApplications
- Returns:
- a
Set
object.
-
setApplications
public void setApplications(java.util.Set<OnmsApplication> applications)
setApplications
- Parameters:
applications
- aSet
object.
-
addApplication
public boolean addApplication(OnmsApplication application)
addApplication
- Parameters:
application
- aOnmsApplication
object.- Returns:
- a boolean.
-
removeApplication
public boolean removeApplication(OnmsApplication application)
removeApplication
- Parameters:
application
- aOnmsApplication
object.- Returns:
- a boolean.
-
compareTo
public int compareTo(OnmsMonitoredService o)
compareTo
- Specified by:
compareTo
in interfacejava.lang.Comparable<OnmsMonitoredService>
- Parameters:
o
- aOnmsMonitoredService
object.- Returns:
- a int.
-
mergeServiceAttributes
public void mergeServiceAttributes(OnmsMonitoredService scanned)
mergeServiceAttributes
- Parameters:
scanned
- aOnmsMonitoredService
object.
-
mergeMetaData
public void mergeMetaData(OnmsMonitoredService scanned)
-
getForeignSource
public java.lang.String getForeignSource()
-
getForeignId
public java.lang.String getForeignId()
-
-