org.opennms.netmgt.config.eventd
Class EventdConfiguration

java.lang.Object
  extended by org.opennms.netmgt.config.eventd.EventdConfiguration
All Implemented Interfaces:
Serializable

public class EventdConfiguration
extends Object
implements Serializable

Top-level element for the eventd-configuration.xml configuration file.

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

Constructor Summary
EventdConfiguration()
           
 
Method Summary
 void deleteReceivers()
           
 void deleteSocketSoTimeoutPeriod()
           
 void deleteTCPPort()
           
 void deleteUDPPort()
           
 String getGetNextAlarmID()
          Returns the value of field 'getNextAlarmID'.
 String getGetNextEventID()
          Returns the value of field 'getNextEventID'.
 int getReceivers()
          Returns the value of field 'receivers'.
 int getSocketSoTimeoutPeriod()
          Returns the value of field 'socketSoTimeoutPeriod'.
 String getSocketSoTimeoutRequired()
          Returns the value of field 'socketSoTimeoutRequired'.
 String getTCPAddress()
          Returns the value of field 'TCPAddress'.
 int getTCPPort()
          Returns the value of field 'TCPPort'.
 String getUDPAddress()
          Returns the value of field 'UDPAddress'.
 int getUDPPort()
          Returns the value of field 'UDPPort'.
 boolean hasReceivers()
          Method hasReceivers.
 boolean hasSocketSoTimeoutPeriod()
          Method hasSocketSoTimeoutPeriod.
 boolean hasTCPPort()
          Method hasTCPPort.
 boolean hasUDPPort()
          Method hasUDPPort.
 boolean isValid()
          Method isValid.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void setGetNextAlarmID(String getNextAlarmID)
          Sets the value of field 'getNextAlarmID'.
 void setGetNextEventID(String getNextEventID)
          Sets the value of field 'getNextEventID'.
 void setReceivers(int receivers)
          Sets the value of field 'receivers'.
 void setSocketSoTimeoutPeriod(int socketSoTimeoutPeriod)
          Sets the value of field 'socketSoTimeoutPeriod'.
 void setSocketSoTimeoutRequired(String socketSoTimeoutRequired)
          Sets the value of field 'socketSoTimeoutRequired'.
 void setTCPAddress(String TCPAddress)
          Sets the value of field 'TCPAddress'.
 void setTCPPort(int TCPPort)
          Sets the value of field 'TCPPort'.
 void setUDPAddress(String UDPAddress)
          Sets the value of field 'UDPAddress'.
 void setUDPPort(int UDPPort)
          Sets the value of field 'UDPPort'.
static EventdConfiguration 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

EventdConfiguration

public EventdConfiguration()
Method Detail

deleteReceivers

public void deleteReceivers()

deleteSocketSoTimeoutPeriod

public void deleteSocketSoTimeoutPeriod()

deleteTCPPort

public void deleteTCPPort()

deleteUDPPort

public void deleteUDPPort()

getGetNextAlarmID

public String getGetNextAlarmID()
Returns the value of field 'getNextAlarmID'. The field 'getNextAlarmID' has the following description: SQL query to get the next sequence for the alarms table serial number.

Returns:
the value of field 'GetNextAlarmID'.

getGetNextEventID

public String getGetNextEventID()
Returns the value of field 'getNextEventID'. The field 'getNextEventID' has the following description: SQL query to get next value of the 'nodeNxtId' database sequence. This is used to make the access database independant.

Returns:
the value of field 'GetNextEventID'.

getReceivers

public int getReceivers()
Returns the value of field 'receivers'. The field 'receivers' has the following description: The maximum number of threads used for reading and processing of incoming events.

Returns:
the value of field 'Receivers'.

getSocketSoTimeoutPeriod

public int getSocketSoTimeoutPeriod()
Returns the value of field 'socketSoTimeoutPeriod'. The field 'socketSoTimeoutPeriod' has the following description: Socket timeout, in milliseconds. This is only set on eventd's sockets if socketSoTimeoutRequired is set to 'yes'.

Returns:
the value of field 'SocketSoTimeoutPeriod'.

getSocketSoTimeoutRequired

public String getSocketSoTimeoutRequired()
Returns the value of field 'socketSoTimeoutRequired'. The field 'socketSoTimeoutRequired' has the following description: Set the socket timeout value. In Linux, the close() system call is not preemptive. Setting this attribute to to 'yes' causes the socketSoTimeoutPeriod attribute to be set on sockets to mimic non-blocking socket I/O.

Returns:
the value of field 'SocketSoTimeoutRequired'.

getTCPAddress

public String getTCPAddress()
Returns the value of field 'TCPAddress'. The field 'TCPAddress' has the following description: The IP address on which eventd listens for TCP connections. If "" is specified, eventd will bind to all addresses. The default address is 127.0.0.1.

Returns:
the value of field 'TCPAddress'.

getTCPPort

public int getTCPPort()
Returns the value of field 'TCPPort'. The field 'TCPPort' has the following description: The port on which eventd listens for TCP connections. The default port is 5817.

Returns:
the value of field 'TCPPort'.

getUDPAddress

public String getUDPAddress()
Returns the value of field 'UDPAddress'. The field 'UDPAddress' has the following description: The IP address on which eventd listens for UDP packets. If "" is specified, eventd will bind to all addresses. The default address is 127.0.0.1.

Returns:
the value of field 'UDPAddress'.

getUDPPort

public int getUDPPort()
Returns the value of field 'UDPPort'. The field 'UDPPort' has the following description: The port on which eventd listens for UDP packets. The default port is 5817.

Returns:
the value of field 'UDPPort'.

hasReceivers

public boolean hasReceivers()
Method hasReceivers.

Returns:
true if at least one Receivers has been added

hasSocketSoTimeoutPeriod

public boolean hasSocketSoTimeoutPeriod()
Method hasSocketSoTimeoutPeriod.

Returns:
true if at least one SocketSoTimeoutPeriod has been added

hasTCPPort

public boolean hasTCPPort()
Method hasTCPPort.

Returns:
true if at least one TCPPort has been added

hasUDPPort

public boolean hasUDPPort()
Method hasUDPPort.

Returns:
true if at least one UDPPort 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

setGetNextAlarmID

public void setGetNextAlarmID(String getNextAlarmID)
Sets the value of field 'getNextAlarmID'. The field 'getNextAlarmID' has the following description: SQL query to get the next sequence for the alarms table serial number.

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

setGetNextEventID

public void setGetNextEventID(String getNextEventID)
Sets the value of field 'getNextEventID'. The field 'getNextEventID' has the following description: SQL query to get next value of the 'nodeNxtId' database sequence. This is used to make the access database independant.

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

setReceivers

public void setReceivers(int receivers)
Sets the value of field 'receivers'. The field 'receivers' has the following description: The maximum number of threads used for reading and processing of incoming events.

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

setSocketSoTimeoutPeriod

public void setSocketSoTimeoutPeriod(int socketSoTimeoutPeriod)
Sets the value of field 'socketSoTimeoutPeriod'. The field 'socketSoTimeoutPeriod' has the following description: Socket timeout, in milliseconds. This is only set on eventd's sockets if socketSoTimeoutRequired is set to 'yes'.

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

setSocketSoTimeoutRequired

public void setSocketSoTimeoutRequired(String socketSoTimeoutRequired)
Sets the value of field 'socketSoTimeoutRequired'. The field 'socketSoTimeoutRequired' has the following description: Set the socket timeout value. In Linux, the close() system call is not preemptive. Setting this attribute to to 'yes' causes the socketSoTimeoutPeriod attribute to be set on sockets to mimic non-blocking socket I/O.

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

setTCPAddress

public void setTCPAddress(String TCPAddress)
Sets the value of field 'TCPAddress'. The field 'TCPAddress' has the following description: The IP address on which eventd listens for TCP connections. If "" is specified, eventd will bind to all addresses. The default address is 127.0.0.1.

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

setTCPPort

public void setTCPPort(int TCPPort)
Sets the value of field 'TCPPort'. The field 'TCPPort' has the following description: The port on which eventd listens for TCP connections. The default port is 5817.

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

setUDPAddress

public void setUDPAddress(String UDPAddress)
Sets the value of field 'UDPAddress'. The field 'UDPAddress' has the following description: The IP address on which eventd listens for UDP packets. If "" is specified, eventd will bind to all addresses. The default address is 127.0.0.1.

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

setUDPPort

public void setUDPPort(int UDPPort)
Sets the value of field 'UDPPort'. The field 'UDPPort' has the following description: The port on which eventd listens for UDP packets. The default port is 5817.

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

unmarshal

public static EventdConfiguration 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.eventd.EventdConfiguration
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.