org.opennms.netmgt.config.snmpinterfacepoller
Class Interface

java.lang.Object
  extended by org.opennms.netmgt.config.snmpinterfacepoller.Interface
All Implemented Interfaces:
Serializable

public class Interface
extends Object
implements Serializable

Interfaces to be polled for addresses in this package.

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

Constructor Summary
Interface()
           
 
Method Summary
 void deleteInterval()
           
 void deleteMaxInterfacePerPdu()
           
 void deleteMaxVarsPerPdu()
           
 void deletePort()
           
 void deleteRetry()
           
 void deleteTimeout()
           
 boolean equals(Object obj)
          Overrides the java.lang.Object.equals method.
 String getCriteria()
          Returns the value of field 'criteria'.
 long getInterval()
          Returns the value of field 'interval'.
 int getMaxInterfacePerPdu()
          Returns the value of field 'maxInterfacePerPdu'.
 int getMaxVarsPerPdu()
          Returns the value of field 'maxVarsPerPdu'.
 String getName()
          Returns the value of field 'name'.
 int getPort()
          Returns the value of field 'port'.
 int getRetry()
          Returns the value of field 'retry'.
 String getStatus()
          Returns the value of field 'status'.
 int getTimeout()
          Returns the value of field 'timeout'.
 String getUserDefined()
          Returns the value of field 'userDefined'.
 int hashCode()
          Overrides the java.lang.Object.hashCode method.
 boolean hasInterval()
          Method hasInterval.
 boolean hasMaxInterfacePerPdu()
          Method hasMaxInterfacePerPdu.
 boolean hasMaxVarsPerPdu()
          Method hasMaxVarsPerPdu.
 boolean hasPort()
          Method hasPort.
 boolean hasRetry()
          Method hasRetry.
 boolean hasTimeout()
          Method hasTimeout.
 boolean isValid()
          Method isValid.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void setCriteria(String criteria)
          Sets the value of field 'criteria'.
 void setInterval(long interval)
          Sets the value of field 'interval'.
 void setMaxInterfacePerPdu(int maxInterfacePerPdu)
          Sets the value of field 'maxInterfacePerPdu'.
 void setMaxVarsPerPdu(int maxVarsPerPdu)
          Sets the value of field 'maxVarsPerPdu'.
 void setName(String name)
          Sets the value of field 'name'.
 void setPort(int port)
          Sets the value of field 'port'.
 void setRetry(int retry)
          Sets the value of field 'retry'.
 void setStatus(String status)
          Sets the value of field 'status'.
 void setTimeout(int timeout)
          Sets the value of field 'timeout'.
 void setUserDefined(String userDefined)
          Sets the value of field 'userDefined'.
static Interface unmarshal(Reader reader)
          Method unmarshal.
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Interface

public Interface()
Method Detail

deleteInterval

public void deleteInterval()

deleteMaxInterfacePerPdu

public void deleteMaxInterfacePerPdu()

deleteMaxVarsPerPdu

public void deleteMaxVarsPerPdu()

deletePort

public void deletePort()

deleteRetry

public void deleteRetry()

deleteTimeout

public void deleteTimeout()

equals

public boolean equals(Object obj)
Overrides the java.lang.Object.equals method.

Overrides:
equals in class Object
Parameters:
obj -
Returns:
true if the objects are equal.

getCriteria

public String getCriteria()
Returns the value of field 'criteria'. The field 'criteria' has the following description: This represents the SQL criteria that is performed to select interfaces to be polled example: (snmpifname like '%eth%' and snmpiftype=6)

Returns:
the value of field 'Criteria'.

getInterval

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

Returns:
the value of field 'Interval'.

getMaxInterfacePerPdu

public int getMaxInterfacePerPdu()
Returns the value of field 'maxInterfacePerPdu'. The field 'maxInterfacePerPdu' has the following description: Max Number of Interface per runnable. This is deprecated and will be ignored in the code!

Returns:
the value of field 'MaxInterfacePerPdu'.

getMaxVarsPerPdu

public int getMaxVarsPerPdu()
Returns the value of field 'maxVarsPerPdu'. The field 'maxVarsPerPdu' has the following description: Number of variables to send per SNMP request.

Returns:
the value of field 'MaxVarsPerPdu'.

getName

public String getName()
Returns the value of field 'name'. The field 'name' has the following description: Interfaces group name

Returns:
the value of field 'Name'.

getPort

public int getPort()
Returns the value of field 'port'. The field 'port' has the following description: If set, overrides UDP port 161 as the port where SNMP GET/GETNEXT/GETBULK requests are sent.

Returns:
the value of field 'Port'.

getRetry

public int getRetry()
Returns the value of field 'retry'. The field 'retry' has the following description: Default number of retries

Returns:
the value of field 'Retry'.

getStatus

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

Returns:
the value of field 'Status'.

getTimeout

public int getTimeout()
Returns the value of field 'timeout'. The field 'timeout' has the following description: Default timeout (in milliseconds)

Returns:
the value of field 'Timeout'.

getUserDefined

public 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:
the value of field 'UserDefined'.

hasInterval

public boolean hasInterval()
Method hasInterval.

Returns:
true if at least one Interval has been added

hasMaxInterfacePerPdu

public boolean hasMaxInterfacePerPdu()
Method hasMaxInterfacePerPdu.

Returns:
true if at least one MaxInterfacePerPdu has been adde

hasMaxVarsPerPdu

public boolean hasMaxVarsPerPdu()
Method hasMaxVarsPerPdu.

Returns:
true if at least one MaxVarsPerPdu has been added

hasPort

public boolean hasPort()
Method hasPort.

Returns:
true if at least one Port has been added

hasRetry

public boolean hasRetry()
Method hasRetry.

Returns:
true if at least one Retry has been added

hasTimeout

public boolean hasTimeout()
Method hasTimeout.

Returns:
true if at least one Timeout has been added

hashCode

public int hashCode()
Overrides the java.lang.Object.hashCode method.

The following steps came from Effective Java Programming Language Guide by Joshua Bloch, Chapter 3

Overrides:
hashCode in class Object
Returns:
a hash code value for the object.

isValid

public boolean isValid()
Method isValid.

Returns:
true if this object is valid according to the schema

marshal

public void marshal(Writer out)
             throws org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Parameters:
out -
Throws:
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema

marshal

public void marshal(ContentHandler handler)
             throws IOException,
                    org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Parameters:
handler -
Throws:
IOException - if an IOException occurs during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling

setCriteria

public void setCriteria(String criteria)
Sets the value of field 'criteria'. The field 'criteria' has the following description: This represents the SQL criteria that is performed to select interfaces to be polled example: (snmpifname like '%eth%' and snmpiftype=6)

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

setInterval

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

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

setMaxInterfacePerPdu

public void setMaxInterfacePerPdu(int maxInterfacePerPdu)
Sets the value of field 'maxInterfacePerPdu'. The field 'maxInterfacePerPdu' has the following description: Max Number of Interface per runnable. This is deprecated and will be ignored in the code!

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

setMaxVarsPerPdu

public void setMaxVarsPerPdu(int maxVarsPerPdu)
Sets the value of field 'maxVarsPerPdu'. The field 'maxVarsPerPdu' has the following description: Number of variables to send per SNMP request.

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

setName

public void setName(String name)
Sets the value of field 'name'. The field 'name' has the following description: Interfaces group name

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

setPort

public void setPort(int port)
Sets the value of field 'port'. The field 'port' has the following description: If set, overrides UDP port 161 as the port where SNMP GET/GETNEXT/GETBULK requests are sent.

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

setRetry

public void setRetry(int retry)
Sets the value of field 'retry'. The field 'retry' has the following description: Default number of retries

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

setStatus

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

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

setTimeout

public void setTimeout(int timeout)
Sets the value of field 'timeout'. The field 'timeout' has the following description: Default timeout (in milliseconds)

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

setUserDefined

public void setUserDefined(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 Interface unmarshal(Reader reader)
                           throws org.exolab.castor.xml.MarshalException,
                                  org.exolab.castor.xml.ValidationException
Method unmarshal.

Parameters:
reader -
Returns:
the unmarshaled org.opennms.netmgt.config.snmpinterfacepoller.Interface
Throws:
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema

validate

public void validate()
              throws org.exolab.castor.xml.ValidationException
Throws:
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema


Copyright © 2011. All Rights Reserved.