org.opennms.netmgt.config.capsd
Class ProtocolPlugin

java.lang.Object
  extended by org.opennms.netmgt.config.capsd.ProtocolPlugin
All Implemented Interfaces:
Serializable

public class ProtocolPlugin
extends Object
implements Serializable

protocol plugin definition

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

Constructor Summary
ProtocolPlugin()
           
 
Method Summary
 void addProperty(int index, Property vProperty)
           
 void addProperty(Property vProperty)
           
 void addProtocolConfiguration(int index, ProtocolConfiguration vProtocolConfiguration)
           
 void addProtocolConfiguration(ProtocolConfiguration vProtocolConfiguration)
           
 Enumeration<Property> enumerateProperty()
          Method enumerateProperty.
 Enumeration<ProtocolConfiguration> enumerateProtocolConfiguration()
          Method enumerateProtocolConfiguration.
 String getClassName()
          Returns the value of field 'className'.
 Property[] getProperty()
          Method getProperty.Returns the contents of the collection in an Array.
 Property getProperty(int index)
          Method getProperty.
 List<Property> getPropertyCollection()
          Method getPropertyCollection.Returns a reference to '_propertyList'.
 int getPropertyCount()
          Method getPropertyCount.
 String getProtocol()
          Returns the value of field 'protocol'.
 ProtocolConfiguration[] getProtocolConfiguration()
          Method getProtocolConfiguration.Returns the contents of the collection in an Array.
 ProtocolConfiguration getProtocolConfiguration(int index)
          Method getProtocolConfiguration.
 List<ProtocolConfiguration> getProtocolConfigurationCollection()
          Method getProtocolConfigurationCollection.Returns a reference to '_protocolConfigurationList'.
 int getProtocolConfigurationCount()
          Method getProtocolConfigurationCount.
 String getScan()
          Returns the value of field 'scan'.
 String getUserDefined()
          Returns the value of field 'userDefined'.
 boolean isValid()
          Method isValid.
 Iterator<Property> iterateProperty()
          Method iterateProperty.
 Iterator<ProtocolConfiguration> iterateProtocolConfiguration()
          Method iterateProtocolConfiguration.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllProperty()
           
 void removeAllProtocolConfiguration()
           
 boolean removeProperty(Property vProperty)
          Method removeProperty.
 Property removePropertyAt(int index)
          Method removePropertyAt.
 boolean removeProtocolConfiguration(ProtocolConfiguration vProtocolConfiguration)
          Method removeProtocolConfiguration.
 ProtocolConfiguration removeProtocolConfigurationAt(int index)
          Method removeProtocolConfigurationAt.
 void setClassName(String className)
          Sets the value of field 'className'.
 void setProperty(int index, Property vProperty)
           
 void setProperty(List<Property> vPropertyList)
          Sets the value of '_propertyList' by copying the given Vector.
 void setProperty(Property[] vPropertyArray)
           
 void setPropertyCollection(List<Property> propertyList)
          Deprecated.  
 void setProtocol(String protocol)
          Sets the value of field 'protocol'.
 void setProtocolConfiguration(int index, ProtocolConfiguration vProtocolConfiguration)
           
 void setProtocolConfiguration(List<ProtocolConfiguration> vProtocolConfigurationList)
          Sets the value of '_protocolConfigurationList' by copying the given Vector.
 void setProtocolConfiguration(ProtocolConfiguration[] vProtocolConfigurationArray)
           
 void setProtocolConfigurationCollection(List<ProtocolConfiguration> protocolConfigurationList)
          Deprecated.  
 void setScan(String scan)
          Sets the value of field 'scan'.
 void setUserDefined(String userDefined)
          Sets the value of field 'userDefined'.
static ProtocolPlugin unmarshal(Reader reader)
          Method unmarshal.
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProtocolPlugin

public ProtocolPlugin()
Method Detail

addProperty

public void addProperty(Property vProperty)
                 throws IndexOutOfBoundsException
Parameters:
vProperty -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addProperty

public void addProperty(int index,
                        Property vProperty)
                 throws IndexOutOfBoundsException
Parameters:
index -
vProperty -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addProtocolConfiguration

public void addProtocolConfiguration(ProtocolConfiguration vProtocolConfiguration)
                              throws IndexOutOfBoundsException
Parameters:
vProtocolConfiguration -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addProtocolConfiguration

public void addProtocolConfiguration(int index,
                                     ProtocolConfiguration vProtocolConfiguration)
                              throws IndexOutOfBoundsException
Parameters:
index -
vProtocolConfiguration -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateProperty

public Enumeration<Property> enumerateProperty()
Method enumerateProperty.

Returns:
an Enumeration over all possible elements of this collection

enumerateProtocolConfiguration

public Enumeration<ProtocolConfiguration> enumerateProtocolConfiguration()
Method enumerateProtocolConfiguration.

Returns:
an Enumeration over all possible elements of this collection

getClassName

public String getClassName()
Returns the value of field 'className'. The field 'className' has the following description: Java class name of the plugin used for testing this protocol.

Returns:
the value of field 'ClassName'.

getProperty

public Property getProperty(int index)
                     throws IndexOutOfBoundsException
Method getProperty.

Parameters:
index -
Returns:
the value of the org.opennms.netmgt.config.capsd.Property at the given index
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getProperty

public Property[] getProperty()
Method getProperty.Returns the contents of the collection in an Array.

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.

Returns:
this collection as an Array

getPropertyCollection

public List<Property> getPropertyCollection()
Method getPropertyCollection.Returns a reference to '_propertyList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getPropertyCount

public int getPropertyCount()
Method getPropertyCount.

Returns:
the size of this collection

getProtocol

public String getProtocol()
Returns the value of field 'protocol'. The field 'protocol' has the following description: protocol name

Returns:
the value of field 'Protocol'.

getProtocolConfiguration

public ProtocolConfiguration getProtocolConfiguration(int index)
                                               throws IndexOutOfBoundsException
Method getProtocolConfiguration.

Parameters:
index -
Returns:
the value of the org.opennms.netmgt.config.capsd.ProtocolConfiguration at the given index
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getProtocolConfiguration

public ProtocolConfiguration[] getProtocolConfiguration()
Method getProtocolConfiguration.Returns the contents of the collection in an Array.

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.

Returns:
this collection as an Array

getProtocolConfigurationCollection

public List<ProtocolConfiguration> getProtocolConfigurationCollection()
Method getProtocolConfigurationCollection.Returns a reference to '_protocolConfigurationList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getProtocolConfigurationCount

public int getProtocolConfigurationCount()
Method getProtocolConfigurationCount.

Returns:
the size of this collection

getScan

public String getScan()
Returns the value of field 'scan'. The field 'scan' has the following description: Controls whether this protocol is scanned by Capsd. The default is 'on'.

Returns:
the value of field 'Scan'.

getUserDefined

public String getUserDefined()
Returns the value of field 'userDefined'. The field 'userDefined' has the following description: Specifies if the protocol was added by the user via the UI.

Returns:
the value of field 'UserDefined'.

isValid

public boolean isValid()
Method isValid.

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

iterateProperty

public Iterator<Property> iterateProperty()
Method iterateProperty.

Returns:
an Iterator over all possible elements in this collection

iterateProtocolConfiguration

public Iterator<ProtocolConfiguration> iterateProtocolConfiguration()
Method iterateProtocolConfiguration.

Returns:
an Iterator over all possible elements in this collection

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

removeAllProperty

public void removeAllProperty()

removeAllProtocolConfiguration

public void removeAllProtocolConfiguration()

removeProperty

public boolean removeProperty(Property vProperty)
Method removeProperty.

Parameters:
vProperty -
Returns:
true if the object was removed from the collection.

removePropertyAt

public Property removePropertyAt(int index)
Method removePropertyAt.

Parameters:
index -
Returns:
the element removed from the collection

removeProtocolConfiguration

public boolean removeProtocolConfiguration(ProtocolConfiguration vProtocolConfiguration)
Method removeProtocolConfiguration.

Parameters:
vProtocolConfiguration -
Returns:
true if the object was removed from the collection.

removeProtocolConfigurationAt

public ProtocolConfiguration removeProtocolConfigurationAt(int index)
Method removeProtocolConfigurationAt.

Parameters:
index -
Returns:
the element removed from the collection

setClassName

public void setClassName(String className)
Sets the value of field 'className'. The field 'className' has the following description: Java class name of the plugin used for testing this protocol.

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

setProperty

public void setProperty(int index,
                        Property vProperty)
                 throws IndexOutOfBoundsException
Parameters:
index -
vProperty -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setProperty

public void setProperty(Property[] vPropertyArray)
Parameters:
vPropertyArray -

setProperty

public void setProperty(List<Property> vPropertyList)
Sets the value of '_propertyList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vPropertyList - the Vector to copy.

setPropertyCollection

public void setPropertyCollection(List<Property> propertyList)
Deprecated. 

Sets the value of '_propertyList' by setting it to the given Vector. No type checking is performed.

Parameters:
propertyList - the Vector to set.

setProtocol

public void setProtocol(String protocol)
Sets the value of field 'protocol'. The field 'protocol' has the following description: protocol name

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

setProtocolConfiguration

public void setProtocolConfiguration(int index,
                                     ProtocolConfiguration vProtocolConfiguration)
                              throws IndexOutOfBoundsException
Parameters:
index -
vProtocolConfiguration -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setProtocolConfiguration

public void setProtocolConfiguration(ProtocolConfiguration[] vProtocolConfigurationArray)
Parameters:
vProtocolConfigurationArray -

setProtocolConfiguration

public void setProtocolConfiguration(List<ProtocolConfiguration> vProtocolConfigurationList)
Sets the value of '_protocolConfigurationList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vProtocolConfigurationList - the Vector to copy.

setProtocolConfigurationCollection

public void setProtocolConfigurationCollection(List<ProtocolConfiguration> protocolConfigurationList)
Deprecated. 

Sets the value of '_protocolConfigurationList' by setting it to the given Vector. No type checking is performed.

Parameters:
protocolConfigurationList - the Vector to set.

setScan

public void setScan(String scan)
Sets the value of field 'scan'. The field 'scan' has the following description: Controls whether this protocol is scanned by Capsd. The default is 'on'.

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

setUserDefined

public void setUserDefined(String userDefined)
Sets the value of field 'userDefined'. The field 'userDefined' has the following description: Specifies if the protocol was added by the user via the UI.

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

unmarshal

public static ProtocolPlugin 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.capsd.ProtocolPlugin
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 © 2008. All Rights Reserved.