|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.opennms.bb.dp.events.EventImport
EventImport sends events in the XML format to the specified remote host via either TCP or UDP
Field Summary | |
private int |
EVENTD_TCP_PORT
the port at which 'eventd' listens for events coming in thru' TCP |
private int |
EVENTD_UDP_PORT
the port at which 'eventd' listens for events coming in thru' UDP |
private String |
m_fileName
filename which contains the event xml to be sent |
private String |
m_host
the remote host to which the events are to be sent |
private boolean |
m_tcp
indicates if user has specified TCP |
private boolean |
m_udp
indicates if user has specified UDP |
private int |
READ_LEN
the length to be read each time while reading the file |
Constructor Summary | |
EventImport(String[] args)
Constructs the EventImport class - process the arguments, reads from the file and sends it to the remote host using the mode specified |
Method Summary | |
private byte[] |
getMessageToSend()
Read the data to be sent from the filename specified |
static void |
main(String[] args)
Start up EventImport |
static void |
printUsage()
print the usage instructions |
private boolean |
processArgs(String[] args)
Process and extract the arguments to get the filename and the mode to be used to send the data |
private void |
tcpSend(byte[] xmlStr)
Send to the TCP port of eventd |
private void |
udpSend(byte[] xmlStr)
Send to udp port of eventd |
Methods inherited from class java.lang.Object |
|
Field Detail |
private boolean m_tcp
private boolean m_udp
private String m_fileName
private String m_host
private final int READ_LEN
private final int EVENTD_TCP_PORT
private final int EVENTD_UDP_PORT
Constructor Detail |
public EventImport(String[] args) throws IOException
args[]
- the argument list sent to the classMethod Detail |
private boolean processArgs(String[] args)
private byte[] getMessageToSend() throws IOException
private void tcpSend(byte[] xmlStr) throws IOException
private void udpSend(byte[] xmlStr) throws IOException
public static void printUsage()
public static void main(String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |