org.opennms.netmgt.config.xmlrpcd
Class ExternalServers

java.lang.Object
  extended by org.opennms.netmgt.config.xmlrpcd.ExternalServers
All Implemented Interfaces:
Serializable

public class ExternalServers
extends Object
implements Serializable

Defines a main XMLRPC server and a set of backup XMLRPC servers

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

Constructor Summary
ExternalServers()
           
 
Method Summary
 void addXmlrpcServer(int index, XmlrpcServer vXmlrpcServer)
           
 void addXmlrpcServer(XmlrpcServer vXmlrpcServer)
           
 void deleteElapseTime()
           
 void deleteRetries()
           
 Enumeration<XmlrpcServer> enumerateXmlrpcServer()
          Method enumerateXmlrpcServer.
 int getElapseTime()
          Returns the value of field 'elapseTime'.
 int getRetries()
          Returns the value of field 'retries'.
 XmlrpcServer[] getXmlrpcServer()
          Method getXmlrpcServer.Returns the contents of the collection in an Array.
 XmlrpcServer getXmlrpcServer(int index)
          Method getXmlrpcServer.
 List<XmlrpcServer> getXmlrpcServerCollection()
          Method getXmlrpcServerCollection.Returns a reference to '_xmlrpcServerList'.
 int getXmlrpcServerCount()
          Method getXmlrpcServerCount.
 boolean hasElapseTime()
          Method hasElapseTime.
 boolean hasRetries()
          Method hasRetries.
 boolean isValid()
          Method isValid.
 Iterator<XmlrpcServer> iterateXmlrpcServer()
          Method iterateXmlrpcServer.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllXmlrpcServer()
           
 boolean removeXmlrpcServer(XmlrpcServer vXmlrpcServer)
          Method removeXmlrpcServer.
 XmlrpcServer removeXmlrpcServerAt(int index)
          Method removeXmlrpcServerAt.
 void setElapseTime(int elapseTime)
          Sets the value of field 'elapseTime'.
 void setRetries(int retries)
          Sets the value of field 'retries'.
 void setXmlrpcServer(int index, XmlrpcServer vXmlrpcServer)
           
 void setXmlrpcServer(List<XmlrpcServer> vXmlrpcServerList)
          Sets the value of '_xmlrpcServerList' by copying the given Vector.
 void setXmlrpcServer(XmlrpcServer[] vXmlrpcServerArray)
           
 void setXmlrpcServerCollection(List<XmlrpcServer> xmlrpcServerList)
          Deprecated.  
static ExternalServers 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

ExternalServers

public ExternalServers()
Method Detail

addXmlrpcServer

public void addXmlrpcServer(XmlrpcServer vXmlrpcServer)
                     throws IndexOutOfBoundsException
Parameters:
vXmlrpcServer -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addXmlrpcServer

public void addXmlrpcServer(int index,
                            XmlrpcServer vXmlrpcServer)
                     throws IndexOutOfBoundsException
Parameters:
index -
vXmlrpcServer -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

deleteElapseTime

public void deleteElapseTime()

deleteRetries

public void deleteRetries()

enumerateXmlrpcServer

public Enumeration<XmlrpcServer> enumerateXmlrpcServer()
Method enumerateXmlrpcServer.

Returns:
an Enumeration over all possible elements of this collection

getElapseTime

public int getElapseTime()
Returns the value of field 'elapseTime'. The field 'elapseTime' has the following description: Elapsed time between retries

Returns:
the value of field 'ElapseTime'.

getRetries

public int getRetries()
Returns the value of field 'retries'. The field 'retries' has the following description: Retries to set up communication with an XMLRPC server

Returns:
the value of field 'Retries'.

getXmlrpcServer

public XmlrpcServer getXmlrpcServer(int index)
                             throws IndexOutOfBoundsException
Method getXmlrpcServer.

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

getXmlrpcServer

public XmlrpcServer[] getXmlrpcServer()
Method getXmlrpcServer.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

getXmlrpcServerCollection

public List<XmlrpcServer> getXmlrpcServerCollection()
Method getXmlrpcServerCollection.Returns a reference to '_xmlrpcServerList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getXmlrpcServerCount

public int getXmlrpcServerCount()
Method getXmlrpcServerCount.

Returns:
the size of this collection

hasElapseTime

public boolean hasElapseTime()
Method hasElapseTime.

Returns:
true if at least one ElapseTime has been added

hasRetries

public boolean hasRetries()
Method hasRetries.

Returns:
true if at least one Retries has been added

isValid

public boolean isValid()
Method isValid.

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

iterateXmlrpcServer

public Iterator<XmlrpcServer> iterateXmlrpcServer()
Method iterateXmlrpcServer.

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

removeAllXmlrpcServer

public void removeAllXmlrpcServer()

removeXmlrpcServer

public boolean removeXmlrpcServer(XmlrpcServer vXmlrpcServer)
Method removeXmlrpcServer.

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

removeXmlrpcServerAt

public XmlrpcServer removeXmlrpcServerAt(int index)
Method removeXmlrpcServerAt.

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

setElapseTime

public void setElapseTime(int elapseTime)
Sets the value of field 'elapseTime'. The field 'elapseTime' has the following description: Elapsed time between retries

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

setRetries

public void setRetries(int retries)
Sets the value of field 'retries'. The field 'retries' has the following description: Retries to set up communication with an XMLRPC server

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

setXmlrpcServer

public void setXmlrpcServer(int index,
                            XmlrpcServer vXmlrpcServer)
                     throws IndexOutOfBoundsException
Parameters:
index -
vXmlrpcServer -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setXmlrpcServer

public void setXmlrpcServer(XmlrpcServer[] vXmlrpcServerArray)
Parameters:
vXmlrpcServerArray -

setXmlrpcServer

public void setXmlrpcServer(List<XmlrpcServer> vXmlrpcServerList)
Sets the value of '_xmlrpcServerList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vXmlrpcServerList - the Vector to copy.

setXmlrpcServerCollection

public void setXmlrpcServerCollection(List<XmlrpcServer> xmlrpcServerList)
Deprecated. 

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

Parameters:
xmlrpcServerList - the Vector to set.

unmarshal

public static ExternalServers 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.xmlrpcd.ExternalServers
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.