2
|
1 |
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
|
2 |
// Use of this source code is governed by a BSD-style license that can be
|
|
3 |
// found in the LICENSE file.
|
|
4 |
|
|
5 |
package org.chromium.sdk;
|
|
6 |
|
|
7 |
import java.io.IOException;
|
|
8 |
|
|
9 |
/**
|
|
10 |
* Abstraction of a remote JavaScript virtual machine which is embedded into
|
|
11 |
* some application and accessed via TCP/IP connection to a port opened by
|
|
12 |
* DebuggerAgent. Clients can use it to conduct debugging process.
|
|
13 |
*/
|
|
14 |
public interface StandaloneVm extends JavascriptVm {
|
|
15 |
/**
|
|
16 |
* Connects to the target VM.
|
|
17 |
*
|
|
18 |
* @param listener to report the debug events to
|
|
19 |
* @throws IOException if there was a transport layer error
|
|
20 |
* @throws UnsupportedVersionException if the SDK protocol version is not
|
|
21 |
* compatible with that supported by the browser
|
|
22 |
*/
|
|
23 |
void attach(DebugEventListener listener) throws IOException, UnsupportedVersionException;
|
|
24 |
|
|
25 |
/**
|
|
26 |
* @return name of embedding application as it wished to name itself; might be null
|
|
27 |
*/
|
|
28 |
String getEmbedderName();
|
|
29 |
|
|
30 |
/**
|
|
31 |
* @return version of V8 implementation, format is unspecified; must not be null if
|
|
32 |
* {@link StandaloneVm} has been attached
|
|
33 |
*/
|
|
34 |
String getVmVersion();
|
|
35 |
|
|
36 |
/**
|
|
37 |
* @return message explaining why VM is detached; may be null
|
|
38 |
*/
|
|
39 |
String getDisconnectReason();
|
|
40 |
}
|