Class 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
    • Constructor Detail

      • Service

        public Service()
      • Service

        public Service​(java.lang.String name,
                       long interval,
                       java.lang.String userDefined,
                       java.lang.String status,
                       java.lang.String... parameters)
    • 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 class java.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 class java.lang.Object
        Returns:
        a hash code value for the object.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object