author | Eugene Ostroukhov <eugeneo@symbian.org> |
Mon, 07 Jun 2010 16:51:19 -0700 | |
changeset 355 | 8726e95bcbba |
parent 2 | e4420d2515f1 |
permissions | -rw-r--r-- |
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.internal.protocol; |
|
6 |
||
7 |
import java.util.List; |
|
8 |
||
9 |
import org.chromium.sdk.internal.protocol.data.ScriptHandle; |
|
10 |
import org.chromium.sdk.internal.protocol.data.ValueHandle; |
|
11 |
import org.chromium.sdk.internal.protocolparser.JsonProtocolParseException; |
|
12 |
import org.chromium.sdk.internal.protocolparser.JsonSubtypeCasting; |
|
13 |
import org.chromium.sdk.internal.protocolparser.JsonType; |
|
14 |
import org.json.simple.JSONObject; |
|
15 |
||
16 |
/** |
|
17 |
* This is empty base type for all command response body types. The actual type |
|
18 |
* depends on a particular command. Note that in JSON sometimes it is an array rather than object |
|
19 |
* (for scripts). |
|
20 |
*/ |
|
21 |
@JsonType(subtypesChosenManually=true) |
|
22 |
public interface CommandResponseBody { |
|
23 |
@JsonSubtypeCasting |
|
24 |
BacktraceCommandBody asBacktraceCommandBody() throws JsonProtocolParseException; |
|
25 |
||
26 |
@JsonSubtypeCasting |
|
27 |
List<ScriptHandle> asScripts() throws JsonProtocolParseException; |
|
28 |
||
29 |
@JsonSubtypeCasting |
|
30 |
BreakpointBody asBreakpointBody() throws JsonProtocolParseException; |
|
31 |
||
32 |
@JsonSubtypeCasting |
|
33 |
// map refId -> ValueHandle |
|
34 |
JSONObject asLookupMap() throws JsonProtocolParseException; |
|
35 |
||
36 |
@JsonSubtypeCasting(reinterpret=true) |
|
37 |
ValueHandle asEvaluateBody() throws JsonProtocolParseException; |
|
38 |
||
39 |
@JsonSubtypeCasting |
|
40 |
ScopeBody asScopeBody() throws JsonProtocolParseException; |
|
41 |
||
42 |
@JsonSubtypeCasting |
|
43 |
VersionBody asVersionBody() throws JsonProtocolParseException; |
|
355
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
2
diff
changeset
|
44 |
|
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
2
diff
changeset
|
45 |
@JsonSubtypeCasting |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
2
diff
changeset
|
46 |
ChangeLiveBody asChangeLiveBody() throws JsonProtocolParseException; |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
2
diff
changeset
|
47 |
|
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
2
diff
changeset
|
48 |
@JsonSubtypeCasting |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
2
diff
changeset
|
49 |
ListBreakpointsBody asListBreakpointsBody() throws JsonProtocolParseException; |
2 | 50 |
} |