org.opennms.netmgt.config.mailtransporttest
Class SendmailHost

java.lang.Object
  extended by org.opennms.netmgt.config.mailtransporttest.SendmailHost
All Implemented Interfaces:
Serializable

public class SendmailHost
extends Object
implements Serializable

Define the host and port of the sendmail server. If you don't, defaults will be used and ${ipaddr} is replaced with the IP address of the service.

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

Constructor Summary
SendmailHost()
           
 
Method Summary
 void deletePort()
           
 String getHost()
          Returns the value of field 'host'.
 long getPort()
          Returns the value of field 'port'.
 boolean hasPort()
          Method hasPort.
 boolean isValid()
          Method isValid.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void setHost(String host)
          Sets the value of field 'host'.
 void setPort(long port)
          Sets the value of field 'port'.
static SendmailHost 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

SendmailHost

public SendmailHost()
Method Detail

deletePort

public void deletePort()

getHost

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

Returns:
the value of field 'Host'.

getPort

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

Returns:
the value of field 'Port'.

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

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

setHost

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

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

setPort

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

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

unmarshal

public static SendmailHost 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.mailtransporttest.SendmailHost
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.