|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.opennms.bb.dp.events.EventAttributeStateOnOff | +--org.opennms.bb.dp.events.EventForward
This class is designed to encapsulate all the relavant information for the forward element of the Event DTD. The forward element contains the forwarding destination as its data and two attributes: state & mechanism. This class groups all the information about the XML elemement into a single class.
Field Summary | |
static int |
FWD_SNMP_TCP
Forward the event using TCP/IP protocol with the message encoded using SNMP/BER |
static int |
FWD_SNMP_UDP
Forward the event using UDP/IP protocol with the message encodied using SNMP/BER |
static int |
FWD_XML_TCP
Forward the event using TCP/IP protocol with the message encoded using XML. |
static int |
FWD_XML_UDP
Forward the event using the UDP/IP protocol with the message encoded using XML. |
private int |
m_fwdhow
The protocol to use when forwarding the event. |
private String |
m_fwdto
The forwarding destination. |
Fields inherited from class org.opennms.bb.dp.events.EventAttributeStateOnOff |
m_state, STATE_OFF, STATE_ON |
Constructor Summary | |
EventForward()
Constructs a new instance of the class and sets all the fields to the default values. |
|
EventForward(EventForward second)
Constructs a new forwarding instance that is a duplicate copy of the passed instance. |
|
EventForward(String destination)
Constructs a new forwarding instance with the specific destination. |
|
EventForward(String destination,
int how)
Constructs a new instance of this with the passed destination and protocol. |
|
EventForward(String destination,
int how,
int state)
Constructs a new instance of the class that contains the appropriate forwarding information. |
Method Summary | |
String |
getDestination()
Returns the forwarding destination that is currently set for this instance. |
int |
getForwardType()
Returns the currently set forwarding mechinism. |
(package private) void |
serializeToXML(PrintStream ps)
Writes self to event stream |
void |
set(String destination,
int how)
Sets the information contained in the forwarding instance. |
void |
set(String destination,
int how,
int state)
Sets the information contained in this instance. |
void |
setDestination(String destination)
Sets the forwarding destination for the instance. |
void |
setForwardType(int how)
Sets the forwarding mechinism type for the instance. |
Methods inherited from class org.opennms.bb.dp.events.EventAttributeStateOnOff |
getState, setState |
Methods inherited from class java.lang.Object |
|
Field Detail |
public static final int FWD_SNMP_UDP
public static final int FWD_SNMP_TCP
public static final int FWD_XML_TCP
public static final int FWD_XML_UDP
private int m_fwdhow
private String m_fwdto
Constructor Detail |
public EventForward()
public EventForward(EventForward second)
second
- The instance to copy.public EventForward(String destination)
destination
- The forwarding destination.public EventForward(String destination, int how)
destination
- The forwarding destination.how
- The forwarding protocol.public EventForward(String destination, int how, int state)
destination
- The forwarding destination.how
- The forwarding protocol.state
- The forwarding state.Method Detail |
void serializeToXML(PrintStream ps)
public void set(String destination, int how)
destination
- The forwarding destination.how
- The forwarding protocolpublic void set(String destination, int how, int state)
destination
- The forwarding destination.how
- The forwarding protocol.state
- The forwarding state.public String getDestination()
public void setDestination(String destination)
destination
- The forwarding destination.public int getForwardType()
public void setForwardType(int how)
how
- The protocol used to forward the event.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |