org.opennms.netmgt.config.snmp
Class Configuration

java.lang.Object
  extended by org.opennms.netmgt.config.snmp.Configuration
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Definition, SnmpConfig

public class Configuration
extends Object
implements Serializable

Class Configuration.

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

Constructor Summary
Configuration()
           
 
Method Summary
 void deleteMaxRepetitions()
           
 void deleteMaxRequestSize()
           
 void deleteMaxVarsPerPdu()
           
 void deletePort()
           
 void deleteRetry()
           
 void deleteSecurityLevel()
           
 void deleteTimeout()
           
 boolean equals(Object obj)
          Overrides the java.lang.Object.equals method.
 String getAuthPassphrase()
          Returns the value of field 'authPassphrase'.
 String getAuthProtocol()
          Returns the value of field 'authProtocol'.
 String getContextEngineId()
          Returns the value of field 'contextEngineId'.
 String getContextName()
          Returns the value of field 'contextName'.
 String getEngineId()
          Returns the value of field 'engineId'.
 String getEnterpriseId()
          Returns the value of field 'enterpriseId'.
 int getMaxRepetitions()
          Returns the value of field 'maxRepetitions'.
 int getMaxRequestSize()
          Returns the value of field 'maxRequestSize'.
 int getMaxVarsPerPdu()
          Returns the value of field 'maxVarsPerPdu'.
 int getPort()
          Returns the value of field 'port'.
 String getPrivacyPassphrase()
          Returns the value of field 'privacyPassphrase'.
 String getPrivacyProtocol()
          Returns the value of field 'privacyProtocol'.
 String getProxyHost()
          Returns the value of field 'proxyHost'.
 String getReadCommunity()
          Returns the value of field 'readCommunity'.
 int getRetry()
          Returns the value of field 'retry'.
 int getSecurityLevel()
          Returns the value of field 'securityLevel'.
 String getSecurityName()
          Returns the value of field 'securityName'.
 int getTimeout()
          Returns the value of field 'timeout'.
 String getVersion()
          Returns the value of field 'version'.
 String getWriteCommunity()
          Returns the value of field 'writeCommunity'.
 int hashCode()
          Overrides the java.lang.Object.hashCode method.
 boolean hasMaxRepetitions()
          Method hasMaxRepetitions.
 boolean hasMaxRequestSize()
          Method hasMaxRequestSize.
 boolean hasMaxVarsPerPdu()
          Method hasMaxVarsPerPdu.
 boolean hasPort()
          Method hasPort.
 boolean hasRetry()
          Method hasRetry.
 boolean hasSecurityLevel()
          Method hasSecurityLevel.
 boolean hasTimeout()
          Method hasTimeout.
 boolean isValid()
          Method isValid.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void setAuthPassphrase(String authPassphrase)
          Sets the value of field 'authPassphrase'.
 void setAuthProtocol(String authProtocol)
          Sets the value of field 'authProtocol'.
 void setContextEngineId(String contextEngineId)
          Sets the value of field 'contextEngineId'.
 void setContextName(String contextName)
          Sets the value of field 'contextName'.
 void setEngineId(String engineId)
          Sets the value of field 'engineId'.
 void setEnterpriseId(String enterpriseId)
          Sets the value of field 'enterpriseId'.
 void setMaxRepetitions(int maxRepetitions)
          Sets the value of field 'maxRepetitions'.
 void setMaxRequestSize(int maxRequestSize)
          Sets the value of field 'maxRequestSize'.
 void setMaxVarsPerPdu(int maxVarsPerPdu)
          Sets the value of field 'maxVarsPerPdu'.
 void setPort(int port)
          Sets the value of field 'port'.
 void setPrivacyPassphrase(String privacyPassphrase)
          Sets the value of field 'privacyPassphrase'.
 void setPrivacyProtocol(String privacyProtocol)
          Sets the value of field 'privacyProtocol'.
 void setProxyHost(String proxyHost)
          Sets the value of field 'proxyHost'.
 void setReadCommunity(String readCommunity)
          Sets the value of field 'readCommunity'.
 void setRetry(int retry)
          Sets the value of field 'retry'.
 void setSecurityLevel(int securityLevel)
          Sets the value of field 'securityLevel'.
 void setSecurityName(String securityName)
          Sets the value of field 'securityName'.
 void setTimeout(int timeout)
          Sets the value of field 'timeout'.
 void setVersion(String version)
          Sets the value of field 'version'.
 void setWriteCommunity(String writeCommunity)
          Sets the value of field 'writeCommunity'.
static Configuration 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

Configuration

public Configuration()
Method Detail

deleteMaxRepetitions

public void deleteMaxRepetitions()

deleteMaxRequestSize

public void deleteMaxRequestSize()

deleteMaxVarsPerPdu

public void deleteMaxVarsPerPdu()

deletePort

public void deletePort()

deleteRetry

public void deleteRetry()

deleteSecurityLevel

public void deleteSecurityLevel()

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.

getAuthPassphrase

public String getAuthPassphrase()
Returns the value of field 'authPassphrase'. The field 'authPassphrase' has the following description: SNMPv3

Returns:
the value of field 'AuthPassphrase'.

getAuthProtocol

public String getAuthProtocol()
Returns the value of field 'authProtocol'. The field 'authProtocol' has the following description: SNMPv3

Returns:
the value of field 'AuthProtocol'.

getContextEngineId

public String getContextEngineId()
Returns the value of field 'contextEngineId'. The field 'contextEngineId' has the following description: SNMPv3

Returns:
the value of field 'ContextEngineId'.

getContextName

public String getContextName()
Returns the value of field 'contextName'. The field 'contextName' has the following description: SNMPv3

Returns:
the value of field 'ContextName'.

getEngineId

public String getEngineId()
Returns the value of field 'engineId'. The field 'engineId' has the following description: SNMPv3

Returns:
the value of field 'EngineId'.

getEnterpriseId

public String getEnterpriseId()
Returns the value of field 'enterpriseId'. The field 'enterpriseId' has the following description: SNMPv3

Returns:
the value of field 'EnterpriseId'.

getMaxRepetitions

public int getMaxRepetitions()
Returns the value of field 'maxRepetitions'. The field 'maxRepetitions' has the following description: Number of repetitions to send per get-bulk request.

Returns:
the value of field 'MaxRepetitions'.

getMaxRequestSize

public int getMaxRequestSize()
Returns the value of field 'maxRequestSize'. The field 'maxRequestSize' has the following description: (SNMP4J specific) Specifies the maximum number of bytes that may be encoded into an individual SNMP PDU request by Collectd. Provides a means to limit the size of outgoing PDU requests. Default is 65535, must be at least 484.

Returns:
the value of field 'MaxRequestSize'.

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'.

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'.

getPrivacyPassphrase

public String getPrivacyPassphrase()
Returns the value of field 'privacyPassphrase'. The field 'privacyPassphrase' has the following description: SNMPv3

Returns:
the value of field 'PrivacyPassphrase'.

getPrivacyProtocol

public String getPrivacyProtocol()
Returns the value of field 'privacyProtocol'. The field 'privacyProtocol' has the following description: SNMPv3

Returns:
the value of field 'PrivacyProtocol'.

getProxyHost

public String getProxyHost()
Returns the value of field 'proxyHost'. The field 'proxyHost' has the following description: The proxy host to use when communiciating with this agent

Returns:
the value of field 'ProxyHost'.

getReadCommunity

public String getReadCommunity()
Returns the value of field 'readCommunity'. The field 'readCommunity' has the following description: Default read community string

Returns:
the value of field 'ReadCommunity'.

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'.

getSecurityLevel

public int getSecurityLevel()
Returns the value of field 'securityLevel'. The field 'securityLevel' has the following description: SNMPv3

Returns:
the value of field 'SecurityLevel'.

getSecurityName

public String getSecurityName()
Returns the value of field 'securityName'. The field 'securityName' has the following description: SNMPv3

Returns:
the value of field 'SecurityName'.

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'.

getVersion

public String getVersion()
Returns the value of field 'version'. The field 'version' has the following description: If set, forces SNMP data collection to the specified version.

Returns:
the value of field 'Version'.

getWriteCommunity

public String getWriteCommunity()
Returns the value of field 'writeCommunity'. The field 'writeCommunity' has the following description: Default write community string

Returns:
the value of field 'WriteCommunity'.

hasMaxRepetitions

public boolean hasMaxRepetitions()
Method hasMaxRepetitions.

Returns:
true if at least one MaxRepetitions has been added

hasMaxRequestSize

public boolean hasMaxRequestSize()
Method hasMaxRequestSize.

Returns:
true if at least one MaxRequestSize has been added

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

hasSecurityLevel

public boolean hasSecurityLevel()
Method hasSecurityLevel.

Returns:
true if at least one SecurityLevel 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

setAuthPassphrase

public void setAuthPassphrase(String authPassphrase)
Sets the value of field 'authPassphrase'. The field 'authPassphrase' has the following description: SNMPv3

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

setAuthProtocol

public void setAuthProtocol(String authProtocol)
Sets the value of field 'authProtocol'. The field 'authProtocol' has the following description: SNMPv3

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

setContextEngineId

public void setContextEngineId(String contextEngineId)
Sets the value of field 'contextEngineId'. The field 'contextEngineId' has the following description: SNMPv3

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

setContextName

public void setContextName(String contextName)
Sets the value of field 'contextName'. The field 'contextName' has the following description: SNMPv3

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

setEngineId

public void setEngineId(String engineId)
Sets the value of field 'engineId'. The field 'engineId' has the following description: SNMPv3

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

setEnterpriseId

public void setEnterpriseId(String enterpriseId)
Sets the value of field 'enterpriseId'. The field 'enterpriseId' has the following description: SNMPv3

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

setMaxRepetitions

public void setMaxRepetitions(int maxRepetitions)
Sets the value of field 'maxRepetitions'. The field 'maxRepetitions' has the following description: Number of repetitions to send per get-bulk request.

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

setMaxRequestSize

public void setMaxRequestSize(int maxRequestSize)
Sets the value of field 'maxRequestSize'. The field 'maxRequestSize' has the following description: (SNMP4J specific) Specifies the maximum number of bytes that may be encoded into an individual SNMP PDU request by Collectd. Provides a means to limit the size of outgoing PDU requests. Default is 65535, must be at least 484.

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

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'.

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'.

setPrivacyPassphrase

public void setPrivacyPassphrase(String privacyPassphrase)
Sets the value of field 'privacyPassphrase'. The field 'privacyPassphrase' has the following description: SNMPv3

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

setPrivacyProtocol

public void setPrivacyProtocol(String privacyProtocol)
Sets the value of field 'privacyProtocol'. The field 'privacyProtocol' has the following description: SNMPv3

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

setProxyHost

public void setProxyHost(String proxyHost)
Sets the value of field 'proxyHost'. The field 'proxyHost' has the following description: The proxy host to use when communiciating with this agent

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

setReadCommunity

public void setReadCommunity(String readCommunity)
Sets the value of field 'readCommunity'. The field 'readCommunity' has the following description: Default read community string

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

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'.

setSecurityLevel

public void setSecurityLevel(int securityLevel)
Sets the value of field 'securityLevel'. The field 'securityLevel' has the following description: SNMPv3

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

setSecurityName

public void setSecurityName(String securityName)
Sets the value of field 'securityName'. The field 'securityName' has the following description: SNMPv3

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

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'.

setVersion

public void setVersion(String version)
Sets the value of field 'version'. The field 'version' has the following description: If set, forces SNMP data collection to the specified version.

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

setWriteCommunity

public void setWriteCommunity(String writeCommunity)
Sets the value of field 'writeCommunity'. The field 'writeCommunity' has the following description: Default write community string

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

unmarshal

public static Configuration 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.snmp.Configuration
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.