1 /*
2 * $Id: Main.java,v 1.3 2003/08/06 20:50:42 trondandersen Exp $
3 * Copyright 2003 OErjan Nygaard Austvold. All rights reserved.
4 */
5
6 package org.jdiseq;
7
8 /***
9 *
10 * <p>Changelog:
11 * <pre>
12 * $Log: Main.java,v $
13 * Revision 1.3 2003/08/06 20:50:42 trondandersen
14 * Added properties
15 *
16 * Revision 1.2 2003/04/02 19:48:51 austvold
17 * Minor updates. Mostly adaptation to new event and eventlistener name.
18 * General brush-up on javadoc comments.
19 * Removal of auto-added revision and date-of-commit members.
20 *
21 * Revision 1.1.1.1 2003/03/28 08:18:23 austvold
22 * Initial import.
23 *
24 * </pre>
25 *
26 * @author Ørjan Nygaard Austvold <austvold@acm.org>
27 * @version $Id: Main.java,v 1.3 2003/08/06 20:50:42 trondandersen Exp $
28 */
29 public class Main {
30 public static final String RCS_REVISION = "$Revision: 1.3 $";
31 public static final String RCS_DATE = "$Date: 2003/08/06 20:50:42 $";
32
33 public static void main(String[] args) {
34 if (args.length != 4) {
35 System.err.println(
36 "Usage: " +
37 "org.jdiseq.Main <host> <port> <class includes> <trigger method>\n" +
38 "\n" +
39 "\thost ip address of remotly running host\n" +
40 "\tport port to connec to\n" +
41 "\tclass includes comma-separated glob pattern of classes to include\n" +
42 "\tclass excludes comma-separated glob pattern of classes to exclude\n" +
43 "\ttrigger method name of method actor interact with");
44 return;
45 }
46 String host = args[0];
47 String port = args[1];
48
49 JdiRemoteVMConnector jrvmc = null;
50 try {
51 jrvmc = new JdiRemoteVMConnector(host, port, true);
52 jrvmc.connect();
53 Filter filter = new Filter("org.jdiseq.dummy.Main.execute",
54 new String[]{"org.jdiseq.dummy.*"}, null, null, null);
55 EventRecorder recorder = new EventRecorder(jrvmc, filter);
56 Sequencer sequencer = new Sequencer();
57 recorder.addEventListener(sequencer);
58 recorder.startRecording();
59
60 } catch (JdiConnectionException e) {
61 e.printStackTrace();
62 } finally {
63 // ... if anything happens
64 try {
65 jrvmc.disconnect();
66 } catch (JdiConnectionException e) {
67 e.printStackTrace();
68 }
69 }
70 }
71
72 }
This page was automatically generated by Maven