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: *
15: * See the License for the specific language governing permissions and
16: * limitations under the License.
17: */
18:
19: /**
20: * @author Vitaly A. Provodin
21: * @version $Revision: 1.3 $
22: */
23:
24: /**
25: * Created on 29.01.2005
26: */package org.apache.harmony.jpda.tests.framework;
27:
28: /**
29: * This interface is aimed to provide another way to synchronize execution of
30: * debugger and debuggee beyond the scope of JDWP channel.
31: * <p>
32: * Synchronization is performed by sending text messages. As an example,
33: * it can be implemented via TCP/IP sockets.
34: */
35: public interface DebuggeeSynchronizer {
36:
37: /**
38: * Sends specified string <code>message</code> to the channel.
39: *
40: * @param message message to be sent
41: */
42: abstract public void sendMessage(String message);
43:
44: /**
45: * Waits for specified message. If received string is equal to
46: * <code>message</code> then <code>true</code> returns.
47: *
48: * @param message expected message
49: * @return <code>true</code> if received message is equal to
50: * expected or <code>false</code> otherwise
51: */
52: abstract public boolean receiveMessage(String message);
53:
54: /**
55: * Waits for any message from synchronized channel.
56: *
57: * @return received message
58: */
59: abstract public String receiveMessage();
60: }
|