Package org.opennms.netmgt.model
Class OnmsMonitoredService
- java.lang.Object
-
- org.opennms.netmgt.model.OnmsEntity
-
- org.opennms.netmgt.model.OnmsMonitoredService
-
- All Implemented Interfaces:
Serializable
,Comparable<OnmsMonitoredService>
@Entity public class OnmsMonitoredService extends OnmsEntity implements Serializable, Comparable<OnmsMonitoredService>
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static Map<String,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(String context, String key, String value)
int
compareTo(OnmsMonitoredService o)
compareToSet<OnmsApplication>
getApplications()
getApplicationsSet<OnmsOutage>
getCurrentOutages()
getCurrentOutagesString
getForeignId()
String
getForeignSource()
Integer
getId()
Unique identifier for ifService.Integer
getIfIndex()
getIfIndexInetAddress
getIpAddress()
getIpAddressString
getIpAddressAsString()
Deprecated.OnmsIpInterface
getIpInterface()
getIpInterfaceInteger
getIpInterfaceId()
Integer
getJsonId()
Date
getLastFail()
getLastFailDate
getLastGood()
getLastGoodList<OnmsMetaData>
getMetaData()
Integer
getNodeId()
getNodeIdString
getNotify()
getNotifyString
getQualifier()
getQualifierInteger
getServiceId()
getServiceIdString
getServiceName()
getServiceNameOnmsServiceType
getServiceType()
getServiceTypeString
getSource()
getSourceString
getStatus()
getStatusString
getStatusLong()
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(String context)
void
removeMetaData(String context, String key)
void
setApplications(Set<OnmsApplication> applications)
setApplicationsvoid
setCurrentOutages(Set<OnmsOutage> currentOutages)
setCurrentOutagesvoid
setId(Integer id)
setIdvoid
setIpInterface(OnmsIpInterface ipInterface)
setIpInterfacevoid
setLastFail(Date lastfail)
setLastFailvoid
setLastGood(Date lastgood)
setLastGoodvoid
setMetaData(List<OnmsMetaData> metaData)
void
setNotify(String notify)
setNotifyvoid
setQualifier(String qualifier)
setQualifiervoid
setServiceType(OnmsServiceType service)
setServiceTypevoid
setSource(String source)
setSourcevoid
setStatus(String status)
setStatusvoid
setXmlId(String id)
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
-
getJsonId
public Integer getJsonId()
-
getXmlId
public String getXmlId()
This id is used for the serialized representation such as json, xml etc.
-
setXmlId
public void setXmlId(String id)
-
getIpAddress
public InetAddress getIpAddress()
getIpAddress
- Returns:
- a
String
object.
-
getIpAddressAsString
public String getIpAddressAsString()
Deprecated.getIpAddress
- Returns:
- a
String
object.
-
setLastGood
public void setLastGood(Date lastgood)
setLastGood
- Parameters:
lastgood
- aDate
object.
-
setLastFail
public void setLastFail(Date lastfail)
setLastFail
- Parameters:
lastfail
- aDate
object.
-
setQualifier
public void setQualifier(String qualifier)
setQualifier
- Parameters:
qualifier
- aString
object.
-
getStatusLong
public String getStatusLong()
-
getMetaData
public List<OnmsMetaData> getMetaData()
-
setMetaData
public void setMetaData(List<OnmsMetaData> metaData)
-
removeMetaData
public void removeMetaData(String context)
-
getIpInterface
public OnmsIpInterface getIpInterface()
getIpInterface
- Returns:
- a
OnmsIpInterface
object.
-
getIpInterfaceId
public Integer getIpInterfaceId()
-
setIpInterface
public void setIpInterface(OnmsIpInterface ipInterface)
setIpInterface
- Parameters:
ipInterface
- aOnmsIpInterface
object.
-
getServiceType
public OnmsServiceType getServiceType()
getServiceType
- Returns:
- a
OnmsServiceType
object.
-
setServiceType
public void setServiceType(OnmsServiceType service)
setServiceType
- Parameters:
service
- aOnmsServiceType
object.
-
toString
public String toString()
toString
-
visit
public void visit(EntityVisitor visitor)
visit
- Specified by:
visit
in classOnmsEntity
- Parameters:
visitor
- aEntityVisitor
object.
-
isDown
public boolean isDown()
isDown
- Returns:
- a boolean.
-
getCurrentOutages
public Set<OnmsOutage> getCurrentOutages()
getCurrentOutages
- Returns:
- a
Set
object.
-
setCurrentOutages
public void setCurrentOutages(Set<OnmsOutage> currentOutages)
setCurrentOutages
- Parameters:
currentOutages
- aSet
object.
-
getApplications
public Set<OnmsApplication> getApplications()
getApplications
- Returns:
- a
Set
object.
-
setApplications
public void setApplications(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 interfaceComparable<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 String getForeignSource()
-
getForeignId
public String getForeignId()
-
-