org.opennms.bb.dp.events
Class EventParameter

java.lang.Object
  |
  +--org.opennms.bb.dp.events.EventParameter
All Implemented Interfaces:
Serializable

public class EventParameter
extends Object
implements Serializable

This class is designed to replicate a name/value event parameter pair from an event. The object is used to model the name/value pair that appears in the Event DTD for the Bluebird project.

Version:
CVS $Revision: 1.4 $
Author:
Brian Weaver, OpenNMS
See Also:
Serialized Form

Field Summary
private  String m_name
          The parameter name
private  EventParamValue m_value
          The parameter value.
 
Constructor Summary
EventParameter()
          Constructs a new instance of the class with the default values of an empty string and empty value.
EventParameter(String name)
          Constructs a new instance with the specific name and a default value.
EventParameter(String name, EventParamValue value)
          Constructs a new instance with the specific name and value.
 
Method Summary
 String getName()
          Returns the name of the parameter.
 EventParamValue getValue()
          Returns the value for the parameter.
(package private)  void serializeToXML(PrintStream ps)
          Writes self to event stream
 void set(String name, EventParamValue value)
          Sets the name/value pair for hte parameter.
 void setName(String name)
          Sets the name of the parameter.
 void setValue(EventParamValue value)
          Sets the value for the parameter.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

m_name

private String m_name
The parameter name

m_value

private EventParamValue m_value
The parameter value.
Constructor Detail

EventParameter

public EventParameter()
Constructs a new instance of the class with the default values of an empty string and empty value.

EventParameter

public EventParameter(String name)
Constructs a new instance with the specific name and a default value.
Parameters:
name - The name of the new name/value pair

EventParameter

public EventParameter(String name,
                      EventParamValue value)
Constructs a new instance with the specific name and value.
Parameters:
name - The name for the new name/value pair.
value - The value for the new name/value pair.
Method Detail

serializeToXML

void serializeToXML(PrintStream ps)
Writes self to event stream

getName

public String getName()
Returns the name of the parameter.

setName

public void setName(String name)
Sets the name of the parameter.
Parameters:
name - The new name for the parameter.

getValue

public EventParamValue getValue()
Returns the value for the parameter.

setValue

public void setValue(EventParamValue value)
Sets the value for the parameter.
Parameters:
value - The new value for the parameter.

set

public void set(String name,
                EventParamValue value)
Sets the name/value pair for hte parameter.
Parameters:
name - The new name for the instance.
value - The new value for the instance.