public class SnmpConfig extends Configuration implements Serializable
Constructor and Description |
---|
SnmpConfig() |
SnmpConfig(Integer port,
Integer retry,
Integer timeout,
String readCommunity,
String writeCommunity,
String proxyHost,
String version,
Integer maxVarsPerPdu,
Integer maxRepetitions,
Integer maxRequestSize,
String securityName,
Integer securityLevel,
String authPassphrase,
String authProtocol,
String engineId,
String contextEngineId,
String contextName,
String privacyPassphrase,
String privacyProtocol,
String enterpriseId,
List<Definition> definitionList) |
Modifier and Type | Method and Description |
---|---|
void |
addDefinition(Definition vDefinition) |
void |
addDefinition(int index,
Definition vDefinition) |
Enumeration<Definition> |
enumerateDefinition()
Method enumerateDefinition.
|
boolean |
equals(Object obj)
Overrides the Object.equals method.
|
Definition[] |
getDefinition()
Method getDefinition.Returns the contents of the collection
in an Array.
|
Definition |
getDefinition(int index)
Method getDefinition.
|
List<Definition> |
getDefinitionCollection()
Method getDefinitionCollection.Returns a reference to
'_definitionList'.
|
int |
getDefinitionCount()
Method getDefinitionCount.
|
int |
hashCode()
Overrides the Object.hashCode method.
|
boolean |
isValid()
Method isValid.
|
Iterator<Definition> |
iterateDefinition()
Method iterateDefinition.
|
void |
marshal(ContentHandler handler) |
void |
marshal(Writer out) |
void |
removeAllDefinition() |
boolean |
removeDefinition(Definition vDefinition)
Method removeDefinition.
|
Definition |
removeDefinitionAt(int index)
Method removeDefinitionAt.
|
void |
setDefinition(Definition[] vDefinitionArray) |
void |
setDefinition(int index,
Definition vDefinition) |
void |
setDefinition(List<Definition> vDefinitionList)
Sets the value of '_definitionList' by copying the given
Vector.
|
void |
setDefinitionCollection(List<Definition> definitionList)
Deprecated.
|
String |
toString() |
static Configuration |
unmarshal(Reader reader)
Method unmarshal.
|
void |
validate() |
deleteMaxRepetitions, deleteMaxRequestSize, deleteMaxVarsPerPdu, deletePort, deleteRetry, deleteSecurityLevel, deleteTimeout, getAuthPassphrase, getAuthProtocol, getContextEngineId, getContextName, getEngineId, getEnterpriseId, getMaxRepetitions, getMaxRequestSize, getMaxVarsPerPdu, getPort, getPrivacyPassphrase, getPrivacyProtocol, getProxyHost, getReadCommunity, getRetry, getSecurityLevel, getSecurityName, getTimeout, getVersion, getWriteCommunity, hasMaxRepetitions, hasMaxRequestSize, hasMaxVarsPerPdu, hasPort, hasRetry, hasSecurityLevel, hasTimeout, setAuthPassphrase, setAuthProtocol, setContextEngineId, setContextName, setEngineId, setEnterpriseId, setMaxRepetitions, setMaxRequestSize, setMaxVarsPerPdu, setPort, setPrivacyPassphrase, setPrivacyProtocol, setProxyHost, setReadCommunity, setRetry, setSecurityLevel, setSecurityName, setTimeout, setVersion, setWriteCommunity
public SnmpConfig()
public SnmpConfig(Integer port, Integer retry, Integer timeout, String readCommunity, String writeCommunity, String proxyHost, String version, Integer maxVarsPerPdu, Integer maxRepetitions, Integer maxRequestSize, String securityName, Integer securityLevel, String authPassphrase, String authProtocol, String engineId, String contextEngineId, String contextName, String privacyPassphrase, String privacyProtocol, String enterpriseId, List<Definition> definitionList)
public void addDefinition(Definition vDefinition) throws IndexOutOfBoundsException
vDefinition
- IndexOutOfBoundsException
- if the index
given is outside the bounds of the collectionpublic void addDefinition(int index, Definition vDefinition) throws IndexOutOfBoundsException
index
- vDefinition
- IndexOutOfBoundsException
- if the index
given is outside the bounds of the collectionpublic Enumeration<Definition> enumerateDefinition()
public boolean equals(Object obj)
equals
in class Configuration
obj
- public Definition getDefinition(int index) throws IndexOutOfBoundsException
index
- IndexOutOfBoundsException
- if the index
given is outside the bounds of the collectionpublic Definition[] getDefinition()
Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.
public List<Definition> getDefinitionCollection()
public int getDefinitionCount()
public int hashCode()
The following steps came from Effective Java Programming Language Guide by Joshua Bloch, Chapter 3
hashCode
in class Configuration
public boolean isValid()
isValid
in class Configuration
public Iterator<Definition> iterateDefinition()
public void marshal(Writer out) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
marshal
in class Configuration
out
- org.exolab.castor.xml.MarshalException
- if object is
null or if any SAXException is thrown during marshalingorg.exolab.castor.xml.ValidationException
- if this
object is an invalid instance according to the schemapublic void marshal(ContentHandler handler) throws IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
marshal
in class Configuration
handler
- IOException
- if an IOException occurs during
marshalingorg.exolab.castor.xml.ValidationException
- if this
object is an invalid instance according to the schemaorg.exolab.castor.xml.MarshalException
- if object is
null or if any SAXException is thrown during marshalingpublic void removeAllDefinition()
public boolean removeDefinition(Definition vDefinition)
vDefinition
- public Definition removeDefinitionAt(int index)
index
- public void setDefinition(int index, Definition vDefinition) throws IndexOutOfBoundsException
index
- vDefinition
- IndexOutOfBoundsException
- if the index
given is outside the bounds of the collectionpublic void setDefinition(Definition[] vDefinitionArray)
vDefinitionArray
- public void setDefinition(List<Definition> vDefinitionList)
vDefinitionList
- the Vector to copy.public void setDefinitionCollection(List<Definition> definitionList)
definitionList
- the Vector to set.public static Configuration unmarshal(Reader reader) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
reader
- org.exolab.castor.xml.MarshalException
- if object is
null or if any SAXException is thrown during marshalingorg.exolab.castor.xml.ValidationException
- if this
object is an invalid instance according to the schemapublic void validate() throws org.exolab.castor.xml.ValidationException
validate
in class Configuration
org.exolab.castor.xml.ValidationException
- if this
object is an invalid instance according to the schemapublic String toString()
toString
in class Configuration
Copyright © 2015. All Rights Reserved.