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 primary XMLRPC server (and optional backup servers) and the sets of events to which it subscribes

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

Constructor Summary
ExternalServers()
           
 
Method Summary
 void addServerSubscription(int index, String vServerSubscription)
           
 void addServerSubscription(String vServerSubscription)
           
 void addXmlrpcServer(int index, XmlrpcServer vXmlrpcServer)
           
 void addXmlrpcServer(XmlrpcServer vXmlrpcServer)
           
 void deleteElapseTime()
           
 void deleteRetries()
           
 Enumeration<String> enumerateServerSubscription()
          Method enumerateServerSubscription.
 Enumeration<XmlrpcServer> enumerateXmlrpcServer()
          Method enumerateXmlrpcServer.
 int getElapseTime()
          Returns the value of field 'elapseTime'.
 int getRetries()
          Returns the value of field 'retries'.
 String[] getServerSubscription()
          Method getServerSubscription.Returns the contents of the collection in an Array.
 String getServerSubscription(int index)
          Method getServerSubscription.
 List<String> getServerSubscriptionCollection()
          Method getServerSubscriptionCollection.Returns a reference to '_serverSubscriptionList'.
 int getServerSubscriptionCount()
          Method getServerSubscriptionCount.
 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<String> iterateServerSubscription()
          Method iterateServerSubscription.
 Iterator<XmlrpcServer> iterateXmlrpcServer()
          Method iterateXmlrpcServer.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllServerSubscription()
           
 void removeAllXmlrpcServer()
           
 boolean removeServerSubscription(String vServerSubscription)
          Method removeServerSubscription.
 String removeServerSubscriptionAt(int index)
          Method removeServerSubscriptionAt.
 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 setServerSubscription(int index, String vServerSubscription)
           
 void setServerSubscription(List<String> vServerSubscriptionList)
          Sets the value of '_serverSubscriptionList' by copying the given Vector.
 void setServerSubscription(String[] vServerSubscriptionArray)
           
 void setServerSubscriptionCollection(List<String> serverSubscriptionList)
          Deprecated.  
 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

addServerSubscription

public void addServerSubscription(String vServerSubscription)
                           throws IndexOutOfBoundsException
Parameters:
vServerSubscription -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addServerSubscription

public void addServerSubscription(int index,
                                  String vServerSubscription)
                           throws IndexOutOfBoundsException
Parameters:
index -
vServerSubscription -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

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()

enumerateServerSubscription

public Enumeration<String> enumerateServerSubscription()
Method enumerateServerSubscription.

Returns:
an Enumeration over all possible elements of this collection

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

getServerSubscription

public String getServerSubscription(int index)
                             throws IndexOutOfBoundsException
Method getServerSubscription.

Parameters:
index -
Returns:
the value of the java.lang.String at the given index
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getServerSubscription

public String[] getServerSubscription()
Method getServerSubscription.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

getServerSubscriptionCollection

public List<String> getServerSubscriptionCollection()
Method getServerSubscriptionCollection.Returns a reference to '_serverSubscriptionList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getServerSubscriptionCount

public int getServerSubscriptionCount()
Method getServerSubscriptionCount.

Returns:
the size of this collection

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

iterateServerSubscription

public Iterator<String> iterateServerSubscription()
Method iterateServerSubscription.

Returns:
an Iterator over all possible elements in this collection

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

removeAllServerSubscription

public void removeAllServerSubscription()

removeAllXmlrpcServer

public void removeAllXmlrpcServer()

removeServerSubscription

public boolean removeServerSubscription(String vServerSubscription)
Method removeServerSubscription.

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

removeServerSubscriptionAt

public String removeServerSubscriptionAt(int index)
Method removeServerSubscriptionAt.

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

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

setServerSubscription

public void setServerSubscription(int index,
                                  String vServerSubscription)
                           throws IndexOutOfBoundsException
Parameters:
index -
vServerSubscription -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setServerSubscription

public void setServerSubscription(String[] vServerSubscriptionArray)
Parameters:
vServerSubscriptionArray -

setServerSubscription

public void setServerSubscription(List<String> vServerSubscriptionList)
Sets the value of '_serverSubscriptionList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vServerSubscriptionList - the Vector to copy.

setServerSubscriptionCollection

public void setServerSubscriptionCollection(List<String> serverSubscriptionList)
Deprecated. 

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

Parameters:
serverSubscriptionList - the Vector to set.

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.