org.opennms.netmgt.config.pagesequence
Class Page

java.lang.Object
  extended by org.opennms.netmgt.config.pagesequence.Page
All Implemented Interfaces:
Serializable

public class Page
extends Object
implements Serializable

This element specifies all the possible attributes in as fine grained detail as possible. All that is really required (as you can see below) is the "path" attribute. From that one attribute, the IP address passed in through the ServiceMonitor and ServiceCollector interface, the URL will be fully generated using the supplied defaults in this config. Configure attributes these attributes to the level of detail you need to fully control the behavior. A little bit of indirection is possible here with the host attribute. If the host attribute is anything other than the default, that value will be used instead of the IP address passed in through the API (Interface).

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

Constructor Summary
Page()
           
 
Method Summary
 void addParameter(int index, Parameter vParameter)
           
 void addParameter(Parameter vParameter)
           
 void deletePort()
           
 Enumeration<Parameter> enumerateParameter()
          Method enumerateParameter.
 String getFailureMatch()
          Returns the value of field 'failureMatch'.
 String getFailureMessage()
          Returns the value of field 'failureMessage'.
 String getFragment()
          Returns the value of field 'fragment'.
 String getHost()
          Returns the value of field 'host'.
 String getHttpVersion()
          Returns the value of field 'httpVersion'.
 String getMethod()
          Returns the value of field 'method'.
 Parameter[] getParameter()
          Method getParameter.Returns the contents of the collection in an Array.
 Parameter getParameter(int index)
          Method getParameter.
 List<Parameter> getParameterCollection()
          Method getParameterCollection.Returns a reference to '_parameterList'.
 int getParameterCount()
          Method getParameterCount.
 String getPath()
          Returns the value of field 'path'.
 int getPort()
          Returns the value of field 'port'.
 String getQuery()
          Returns the value of field 'query'.
 String getResponseRange()
          Returns the value of field 'responseRange'.
 String getScheme()
          Returns the value of field 'scheme'.
 String getSuccessMatch()
          Returns the value of field 'successMatch'.
 String getUserAgent()
          Returns the value of field 'userAgent'.
 String getUserInfo()
          Returns the value of field 'userInfo'.
 String getVirtualHost()
          Returns the value of field 'virtualHost'.
 boolean hasPort()
          Method hasPort.
 boolean isValid()
          Method isValid.
 Iterator<Parameter> iterateParameter()
          Method iterateParameter.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllParameter()
           
 boolean removeParameter(Parameter vParameter)
          Method removeParameter.
 Parameter removeParameterAt(int index)
          Method removeParameterAt.
 void setFailureMatch(String failureMatch)
          Sets the value of field 'failureMatch'.
 void setFailureMessage(String failureMessage)
          Sets the value of field 'failureMessage'.
 void setFragment(String fragment)
          Sets the value of field 'fragment'.
 void setHost(String host)
          Sets the value of field 'host'.
 void setHttpVersion(String httpVersion)
          Sets the value of field 'httpVersion'.
 void setMethod(String method)
          Sets the value of field 'method'.
 void setParameter(int index, Parameter vParameter)
           
 void setParameter(List<Parameter> vParameterList)
          Sets the value of '_parameterList' by copying the given Vector.
 void setParameter(Parameter[] vParameterArray)
           
 void setParameterCollection(List<Parameter> parameterList)
          Deprecated.  
 void setPath(String path)
          Sets the value of field 'path'.
 void setPort(int port)
          Sets the value of field 'port'.
 void setQuery(String query)
          Sets the value of field 'query'.
 void setResponseRange(String responseRange)
          Sets the value of field 'responseRange'.
 void setScheme(String scheme)
          Sets the value of field 'scheme'.
 void setSuccessMatch(String successMatch)
          Sets the value of field 'successMatch'.
 void setUserAgent(String userAgent)
          Sets the value of field 'userAgent'.
 void setUserInfo(String userInfo)
          Sets the value of field 'userInfo'.
 void setVirtualHost(String virtualHost)
          Sets the value of field 'virtualHost'.
static Page 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

Page

public Page()
Method Detail

addParameter

public void addParameter(Parameter vParameter)
                  throws IndexOutOfBoundsException
Parameters:
vParameter -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addParameter

public void addParameter(int index,
                         Parameter vParameter)
                  throws IndexOutOfBoundsException
Parameters:
index -
vParameter -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

deletePort

public void deletePort()

enumerateParameter

public Enumeration<Parameter> enumerateParameter()
Method enumerateParameter.

Returns:
an Enumeration over all possible elements of this collection

getFailureMatch

public String getFailureMatch()
Returns the value of field 'failureMatch'.

Returns:
the value of field 'FailureMatch'.

getFailureMessage

public String getFailureMessage()
Returns the value of field 'failureMessage'.

Returns:
the value of field 'FailureMessage'.

getFragment

public String getFragment()
Returns the value of field 'fragment'.

Returns:
the value of field 'Fragment'.

getHost

public String getHost()
Returns the value of field 'host'.

Returns:
the value of field 'Host'.

getHttpVersion

public String getHttpVersion()
Returns the value of field 'httpVersion'.

Returns:
the value of field 'HttpVersion'.

getMethod

public String getMethod()
Returns the value of field 'method'.

Returns:
the value of field 'Method'.

getParameter

public Parameter getParameter(int index)
                       throws IndexOutOfBoundsException
Method getParameter.

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

getParameter

public Parameter[] getParameter()
Method getParameter.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

getParameterCollection

public List<Parameter> getParameterCollection()
Method getParameterCollection.Returns a reference to '_parameterList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getParameterCount

public int getParameterCount()
Method getParameterCount.

Returns:
the size of this collection

getPath

public String getPath()
Returns the value of field 'path'.

Returns:
the value of field 'Path'.

getPort

public int getPort()
Returns the value of field 'port'.

Returns:
the value of field 'Port'.

getQuery

public String getQuery()
Returns the value of field 'query'.

Returns:
the value of field 'Query'.

getResponseRange

public String getResponseRange()
Returns the value of field 'responseRange'.

Returns:
the value of field 'ResponseRange'.

getScheme

public String getScheme()
Returns the value of field 'scheme'.

Returns:
the value of field 'Scheme'.

getSuccessMatch

public String getSuccessMatch()
Returns the value of field 'successMatch'.

Returns:
the value of field 'SuccessMatch'.

getUserAgent

public String getUserAgent()
Returns the value of field 'userAgent'.

Returns:
the value of field 'UserAgent'.

getUserInfo

public String getUserInfo()
Returns the value of field 'userInfo'.

Returns:
the value of field 'UserInfo'.

getVirtualHost

public String getVirtualHost()
Returns the value of field 'virtualHost'.

Returns:
the value of field 'VirtualHost'.

hasPort

public boolean hasPort()
Method hasPort.

Returns:
true if at least one Port has been added

isValid

public boolean isValid()
Method isValid.

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

iterateParameter

public Iterator<Parameter> iterateParameter()
Method iterateParameter.

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

removeAllParameter

public void removeAllParameter()

removeParameter

public boolean removeParameter(Parameter vParameter)
Method removeParameter.

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

removeParameterAt

public Parameter removeParameterAt(int index)
Method removeParameterAt.

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

setFailureMatch

public void setFailureMatch(String failureMatch)
Sets the value of field 'failureMatch'.

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

setFailureMessage

public void setFailureMessage(String failureMessage)
Sets the value of field 'failureMessage'.

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

setFragment

public void setFragment(String fragment)
Sets the value of field 'fragment'.

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

setHost

public void setHost(String host)
Sets the value of field 'host'.

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

setHttpVersion

public void setHttpVersion(String httpVersion)
Sets the value of field 'httpVersion'.

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

setMethod

public void setMethod(String method)
Sets the value of field 'method'.

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

setParameter

public void setParameter(int index,
                         Parameter vParameter)
                  throws IndexOutOfBoundsException
Parameters:
index -
vParameter -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setParameter

public void setParameter(Parameter[] vParameterArray)
Parameters:
vParameterArray -

setParameter

public void setParameter(List<Parameter> vParameterList)
Sets the value of '_parameterList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vParameterList - the Vector to copy.

setParameterCollection

public void setParameterCollection(List<Parameter> parameterList)
Deprecated. 

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

Parameters:
parameterList - the Vector to set.

setPath

public void setPath(String path)
Sets the value of field 'path'.

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

setPort

public void setPort(int port)
Sets the value of field 'port'.

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

setQuery

public void setQuery(String query)
Sets the value of field 'query'.

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

setResponseRange

public void setResponseRange(String responseRange)
Sets the value of field 'responseRange'.

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

setScheme

public void setScheme(String scheme)
Sets the value of field 'scheme'.

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

setSuccessMatch

public void setSuccessMatch(String successMatch)
Sets the value of field 'successMatch'.

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

setUserAgent

public void setUserAgent(String userAgent)
Sets the value of field 'userAgent'.

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

setUserInfo

public void setUserInfo(String userInfo)
Sets the value of field 'userInfo'.

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

setVirtualHost

public void setVirtualHost(String virtualHost)
Sets the value of field 'virtualHost'.

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

unmarshal

public static Page 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.pagesequence.Page
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.