01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: /**
19: * @author Aleksander V. Budniy
20: * @version $Revision: 0.0 $
21: */
22:
23: /**
24: * Created on 25.05.2006
25: */package org.apache.harmony.jpda.tests.jdwp.Events;
26:
27: import org.apache.harmony.jpda.tests.share.JPDADebuggeeSynchronizer;
28: import org.apache.harmony.jpda.tests.share.SyncDebuggee;
29:
30: /**
31: * Debuggee for JDWP unit tests for CombinedEvents.
32: * Calls it's own sampleMethod method.
33: */
34: public class CombinedEventsDebuggee extends SyncDebuggee {
35: public static CombinedEventsDebuggee combinedEventsDebuggee = null;
36:
37: public static void main(String[] args) {
38: runDebuggee(CombinedEventsDebuggee.class);
39: }
40:
41: public void sampleMethod() {
42: logWriter
43: .println("-> CombinedEventsDebuggee: inside of sampleMethod()!");
44: }
45:
46: public void run() {
47: logWriter.println("-> CombinedEventsDebuggee: Starting...");
48: combinedEventsDebuggee = this ;
49:
50: //DBG synchronizer.sendMessage(JPDADebuggeeSynchronizer.SGNL_READY);
51: String mainThreadName = Thread.currentThread().getName();
52: synchronizer.sendMessage(mainThreadName);
53:
54: synchronizer
55: .receiveMessage(JPDADebuggeeSynchronizer.SGNL_CONTINUE);
56:
57: logWriter
58: .println("-> CombinedEventsDebuggee: Before calling sampleMethod");
59:
60: sampleMethod();
61: // new CombinedEventsDebuggee_Extra().proxiMethod();
62:
63: logWriter.println("-> CombinedEventsDebuggee: Finishing...");
64: }
65: }
66:
67: class CombinedEventsDebuggee_Extra {
68: public void proxiMethod() {
69: CombinedEventsDebuggee.combinedEventsDebuggee.sampleMethod();
70: }
71: }
|