Package org.opennms.netmgt.config.poller
Class Service
- java.lang.Object
-
- org.opennms.netmgt.config.poller.Service
-
- All Implemented Interfaces:
java.io.Serializable
public class Service extends java.lang.Object implements java.io.Serializable
Service to be polled for addresses in this package.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addParameter(java.lang.String key, java.lang.String value)
void
addParameter(Parameter parameter)
boolean
equals(java.lang.Object obj)
Overrides the Object.equals method.java.lang.Long
getInterval()
Interval at which the service is to be polledjava.lang.String
getName()
Service nameParameter
getParameter(java.lang.String key)
java.util.List<Parameter>
getParameters()
java.lang.String
getPattern()
java.lang.String
getStatus()
Status of the service.java.lang.String
getUserDefined()
Specifies if the service is user defined.int
hashCode()
Overrides the Object.hashCode method.boolean
removeParameter(Parameter parameter)
void
setInterval(java.lang.Integer interval)
void
setInterval(java.lang.Long interval)
void
setName(java.lang.String name)
void
setParameters(java.util.List<Parameter> parameters)
void
setPattern(java.lang.String pattern)
void
setStatus(java.lang.String status)
void
setUserDefined(java.lang.String userDefined)
java.lang.String
toString()
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Service name
-
setName
public void setName(java.lang.String name)
-
getInterval
public java.lang.Long getInterval()
Interval at which the service is to be polled
-
setInterval
public void setInterval(java.lang.Long interval)
-
setInterval
public void setInterval(java.lang.Integer interval)
-
getUserDefined
public java.lang.String getUserDefined()
Specifies if the service is user defined. Used specifically for UI purposes.
-
setUserDefined
public void setUserDefined(java.lang.String userDefined)
-
getStatus
public java.lang.String getStatus()
Status of the service. The service is polled only if this is set to 'on'.
-
setStatus
public void setStatus(java.lang.String status)
-
getPattern
public java.lang.String getPattern()
-
setPattern
public void setPattern(java.lang.String pattern)
-
getParameters
public java.util.List<Parameter> getParameters()
-
setParameters
public void setParameters(java.util.List<Parameter> parameters)
-
addParameter
public void addParameter(Parameter parameter) throws java.lang.IndexOutOfBoundsException
- Throws:
java.lang.IndexOutOfBoundsException
-
addParameter
public void addParameter(java.lang.String key, java.lang.String value)
-
removeParameter
public boolean removeParameter(Parameter parameter)
-
getParameter
public Parameter getParameter(java.lang.String key)
-
equals
public boolean equals(java.lang.Object obj)
Overrides the Object.equals method.- Overrides:
equals
in classjava.lang.Object
- Parameters:
obj
-- Returns:
- true if the objects are equal.
-
hashCode
public int hashCode()
Overrides the Object.hashCode method.The following steps came from Effective Java Programming Language Guide by Joshua Bloch, Chapter 3
- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- a hash code value for the object.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-