org.opennms.netmgt.config.service
Class Service

java.lang.Object
  extended by org.opennms.netmgt.config.service.Service
All Implemented Interfaces:
Serializable

public class Service
extends Object
implements Serializable

Service to be launched by the manager.

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

Constructor Summary
Service()
           
 
Method Summary
 void addAttribute(Attribute vAttribute)
           
 void addAttribute(int index, Attribute vAttribute)
           
 void addInvoke(int index, Invoke vInvoke)
           
 void addInvoke(Invoke vInvoke)
           
 Enumeration<Attribute> enumerateAttribute()
          Method enumerateAttribute.
 Enumeration<Invoke> enumerateInvoke()
          Method enumerateInvoke.
 Attribute[] getAttribute()
          Method getAttribute.Returns the contents of the collection in an Array.
 Attribute getAttribute(int index)
          Method getAttribute.
 List<Attribute> getAttributeCollection()
          Method getAttributeCollection.Returns a reference to '_attributeList'.
 int getAttributeCount()
          Method getAttributeCount.
 String getClassName()
          Returns the value of field 'className'.
 Invoke[] getInvoke()
          Method getInvoke.Returns the contents of the collection in an Array.
 Invoke getInvoke(int index)
          Method getInvoke.
 List<Invoke> getInvokeCollection()
          Method getInvokeCollection.Returns a reference to '_invokeList'.
 int getInvokeCount()
          Method getInvokeCount.
 String getName()
          Returns the value of field 'name'.
 boolean isValid()
          Method isValid.
 Iterator<Attribute> iterateAttribute()
          Method iterateAttribute.
 Iterator<Invoke> iterateInvoke()
          Method iterateInvoke.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllAttribute()
           
 void removeAllInvoke()
           
 boolean removeAttribute(Attribute vAttribute)
          Method removeAttribute.
 Attribute removeAttributeAt(int index)
          Method removeAttributeAt.
 boolean removeInvoke(Invoke vInvoke)
          Method removeInvoke.
 Invoke removeInvokeAt(int index)
          Method removeInvokeAt.
 void setAttribute(Attribute[] vAttributeArray)
           
 void setAttribute(int index, Attribute vAttribute)
           
 void setAttribute(List<Attribute> vAttributeList)
          Sets the value of '_attributeList' by copying the given Vector.
 void setAttributeCollection(List<Attribute> attributeList)
          Deprecated.  
 void setClassName(String className)
          Sets the value of field 'className'.
 void setInvoke(int index, Invoke vInvoke)
           
 void setInvoke(Invoke[] vInvokeArray)
           
 void setInvoke(List<Invoke> vInvokeList)
          Sets the value of '_invokeList' by copying the given Vector.
 void setInvokeCollection(List<Invoke> invokeList)
          Deprecated.  
 void setName(String name)
          Sets the value of field 'name'.
static Service 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

Service

public Service()
Method Detail

addAttribute

public void addAttribute(Attribute vAttribute)
                  throws IndexOutOfBoundsException
Parameters:
vAttribute -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addAttribute

public void addAttribute(int index,
                         Attribute vAttribute)
                  throws IndexOutOfBoundsException
Parameters:
index -
vAttribute -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addInvoke

public void addInvoke(Invoke vInvoke)
               throws IndexOutOfBoundsException
Parameters:
vInvoke -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addInvoke

public void addInvoke(int index,
                      Invoke vInvoke)
               throws IndexOutOfBoundsException
Parameters:
index -
vInvoke -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateAttribute

public Enumeration<Attribute> enumerateAttribute()
Method enumerateAttribute.

Returns:
an Enumeration over all possible elements of this collection

enumerateInvoke

public Enumeration<Invoke> enumerateInvoke()
Method enumerateInvoke.

Returns:
an Enumeration over all possible elements of this collection

getAttribute

public Attribute getAttribute(int index)
                       throws IndexOutOfBoundsException
Method getAttribute.

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

getAttribute

public Attribute[] getAttribute()
Method getAttribute.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

getAttributeCollection

public List<Attribute> getAttributeCollection()
Method getAttributeCollection.Returns a reference to '_attributeList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getAttributeCount

public int getAttributeCount()
Method getAttributeCount.

Returns:
the size of this collection

getClassName

public String getClassName()
Returns the value of field 'className'.

Returns:
the value of field 'ClassName'.

getInvoke

public Invoke getInvoke(int index)
                 throws IndexOutOfBoundsException
Method getInvoke.

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

getInvoke

public Invoke[] getInvoke()
Method getInvoke.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

getInvokeCollection

public List<Invoke> getInvokeCollection()
Method getInvokeCollection.Returns a reference to '_invokeList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getInvokeCount

public int getInvokeCount()
Method getInvokeCount.

Returns:
the size of this collection

getName

public String getName()
Returns the value of field 'name'.

Returns:
the value of field 'Name'.

isValid

public boolean isValid()
Method isValid.

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

iterateAttribute

public Iterator<Attribute> iterateAttribute()
Method iterateAttribute.

Returns:
an Iterator over all possible elements in this collection

iterateInvoke

public Iterator<Invoke> iterateInvoke()
Method iterateInvoke.

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

removeAllAttribute

public void removeAllAttribute()

removeAllInvoke

public void removeAllInvoke()

removeAttribute

public boolean removeAttribute(Attribute vAttribute)
Method removeAttribute.

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

removeAttributeAt

public Attribute removeAttributeAt(int index)
Method removeAttributeAt.

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

removeInvoke

public boolean removeInvoke(Invoke vInvoke)
Method removeInvoke.

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

removeInvokeAt

public Invoke removeInvokeAt(int index)
Method removeInvokeAt.

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

setAttribute

public void setAttribute(int index,
                         Attribute vAttribute)
                  throws IndexOutOfBoundsException
Parameters:
index -
vAttribute -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setAttribute

public void setAttribute(Attribute[] vAttributeArray)
Parameters:
vAttributeArray -

setAttribute

public void setAttribute(List<Attribute> vAttributeList)
Sets the value of '_attributeList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vAttributeList - the Vector to copy.

setAttributeCollection

public void setAttributeCollection(List<Attribute> attributeList)
Deprecated. 

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

Parameters:
attributeList - the Vector to set.

setClassName

public void setClassName(String className)
Sets the value of field 'className'.

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

setInvoke

public void setInvoke(int index,
                      Invoke vInvoke)
               throws IndexOutOfBoundsException
Parameters:
index -
vInvoke -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setInvoke

public void setInvoke(Invoke[] vInvokeArray)
Parameters:
vInvokeArray -

setInvoke

public void setInvoke(List<Invoke> vInvokeList)
Sets the value of '_invokeList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vInvokeList - the Vector to copy.

setInvokeCollection

public void setInvokeCollection(List<Invoke> invokeList)
Deprecated. 

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

Parameters:
invokeList - the Vector to set.

setName

public void setName(String name)
Sets the value of field 'name'.

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

unmarshal

public static Service 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.service.Service
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.