org.opennms.netmgt.config.poller
Class Service

java.lang.Object
  extended by 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.

Version:
$Revision$ $Date$
See Also:
Serialized Form

Constructor Summary
Service()
           
 
Method Summary
 void addParameter(int index, Parameter vParameter)
          Method addParameter
 void addParameter(Parameter vParameter)
          Method addParameter
 void clearParameter()
          Method clearParameter
 void deleteInterval()
          Method deleteInterval
 java.util.Enumeration enumerateParameter()
          Method enumerateParameter
 long getInterval()
          Returns the value of field 'interval'.
 java.lang.String getName()
          Returns the value of field 'name'.
 Parameter[] getParameter()
          Method getParameter
 Parameter getParameter(int index)
          Method getParameter
 java.util.ArrayList getParameterCollection()
          Method getParameterCollection Returns a reference to 'parameter'.
 int getParameterCount()
          Method getParameterCount
 java.lang.String getStatus()
          Returns the value of field 'status'.
 java.lang.String getUserDefined()
          Returns the value of field 'userDefined'.
 boolean hasInterval()
          Method hasInterval
 boolean isValid()
          Method isValid
 void marshal(org.xml.sax.ContentHandler handler)
          Method marshal
 void marshal(java.io.Writer out)
          Method marshal
 boolean removeParameter(Parameter vParameter)
          Method removeParameter
 void setInterval(long interval)
          Sets the value of field 'interval'.
 void setName(java.lang.String name)
          Sets the value of field 'name'.
 void setParameter(java.util.ArrayList parameterCollection)
          Method setParameter Sets the value of 'parameter' by copying the given ArrayList.
 void setParameter(int index, Parameter vParameter)
          Method setParameter
 void setParameter(Parameter[] parameterArray)
          Method setParameter
 void setParameterCollection(java.util.ArrayList parameterCollection)
          Method setParameterCollection Sets the value of 'parameter' by setting it to the given ArrayList.
 void setStatus(java.lang.String status)
          Sets the value of field 'status'.
 void setUserDefined(java.lang.String userDefined)
          Sets the value of field 'userDefined'.
static java.lang.Object unmarshal(java.io.Reader reader)
          Method unmarshal
 void validate()
          Method validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Service

public Service()
Method Detail

addParameter

public void addParameter(Parameter vParameter)
                  throws java.lang.IndexOutOfBoundsException
Method addParameter

Parameters:
vParameter -
Throws:
java.lang.IndexOutOfBoundsException

addParameter

public void addParameter(int index,
                         Parameter vParameter)
                  throws java.lang.IndexOutOfBoundsException
Method addParameter

Parameters:
index -
vParameter -
Throws:
java.lang.IndexOutOfBoundsException

clearParameter

public void clearParameter()
Method clearParameter


deleteInterval

public void deleteInterval()
Method deleteInterval


enumerateParameter

public java.util.Enumeration enumerateParameter()
Method enumerateParameter

Returns:
Enumeration

getInterval

public long getInterval()
Returns the value of field 'interval'. The field 'interval' has the following description: Interval at which the service is to be polled

Returns:
long

getName

public java.lang.String getName()
Returns the value of field 'name'. The field 'name' has the following description: Service name

Returns:
String

getParameter

public Parameter getParameter(int index)
                       throws java.lang.IndexOutOfBoundsException
Method getParameter

Parameters:
index -
Returns:
Parameter
Throws:
java.lang.IndexOutOfBoundsException

getParameter

public Parameter[] getParameter()
Method getParameter

Returns:
Parameter

getParameterCollection

public java.util.ArrayList getParameterCollection()
Method getParameterCollection Returns a reference to 'parameter'. No type checking is performed on any modications to the Collection.

Returns:
ArrayList

getParameterCount

public int getParameterCount()
Method getParameterCount

Returns:
int

getStatus

public java.lang.String getStatus()
Returns the value of field 'status'. The field 'status' has the following description: Status of the service. The service is polled only if this is set to 'on'.

Returns:
String

getUserDefined

public java.lang.String getUserDefined()
Returns the value of field 'userDefined'. The field 'userDefined' has the following description: Specifies if the service is user defined. Used specifically for UI purposes.

Returns:
String

hasInterval

public boolean hasInterval()
Method hasInterval

Returns:
boolean

isValid

public boolean isValid()
Method isValid

Returns:
boolean

marshal

public void marshal(java.io.Writer out)
             throws org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Method marshal

Parameters:
out -
Throws:
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException

marshal

public void marshal(org.xml.sax.ContentHandler handler)
             throws java.io.IOException,
                    org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Method marshal

Parameters:
handler -
Throws:
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException

removeParameter

public boolean removeParameter(Parameter vParameter)
Method removeParameter

Parameters:
vParameter -
Returns:
boolean

setInterval

public void setInterval(long interval)
Sets the value of field 'interval'. The field 'interval' has the following description: Interval at which the service is to be polled

Parameters:
interval - the value of field 'interval'.

setName

public void setName(java.lang.String name)
Sets the value of field 'name'. The field 'name' has the following description: Service name

Parameters:
name - the value of field 'name'.

setParameter

public void setParameter(int index,
                         Parameter vParameter)
                  throws java.lang.IndexOutOfBoundsException
Method setParameter

Parameters:
index -
vParameter -
Throws:
java.lang.IndexOutOfBoundsException

setParameter

public void setParameter(Parameter[] parameterArray)
Method setParameter

Parameters:
parameterArray -

setParameter

public void setParameter(java.util.ArrayList parameterCollection)
Method setParameter Sets the value of 'parameter' by copying the given ArrayList.

Parameters:
parameterCollection - the Vector to copy.

setParameterCollection

public void setParameterCollection(java.util.ArrayList parameterCollection)
Method setParameterCollection Sets the value of 'parameter' by setting it to the given ArrayList. No type checking is performed.

Parameters:
parameterCollection - the ArrayList to copy.

setStatus

public void setStatus(java.lang.String status)
Sets the value of field 'status'. The field 'status' has the following description: Status of the service. The service is polled only if this is set to 'on'.

Parameters:
status - the value of field 'status'.

setUserDefined

public void setUserDefined(java.lang.String userDefined)
Sets the value of field 'userDefined'. The field 'userDefined' has the following description: Specifies if the service is user defined. Used specifically for UI purposes.

Parameters:
userDefined - the value of field 'userDefined'.

unmarshal

public static java.lang.Object unmarshal(java.io.Reader reader)
                                  throws org.exolab.castor.xml.MarshalException,
                                         org.exolab.castor.xml.ValidationException
Method unmarshal

Parameters:
reader -
Returns:
Object
Throws:
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException

validate

public void validate()
              throws org.exolab.castor.xml.ValidationException
Method validate

Throws:
org.exolab.castor.xml.ValidationException


Copyright © 2007. All Rights Reserved.