org.chromium.sdk/src/org/chromium/sdk/internal/protocol/IncomingMessage.java
changeset 2 e4420d2515f1
equal deleted inserted replaced
1:ef76fc2ac88c 2:e4420d2515f1
       
     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 org.chromium.sdk.internal.protocolparser.JsonSubtypeCasting;
       
     8 import org.chromium.sdk.internal.protocolparser.JsonType;
       
     9 
       
    10 /**
       
    11  * A base type for all incoming message from debugger. There are 2 kinds of messages: response
       
    12  * to a command and event notification. All messages must have unique sequence id.
       
    13  */
       
    14 @JsonType
       
    15 public interface IncomingMessage {
       
    16   long getSeq();
       
    17 
       
    18   MessageType getType();
       
    19 
       
    20   @JsonSubtypeCasting
       
    21   CommandResponse asCommandResponse();
       
    22 
       
    23   @JsonSubtypeCasting
       
    24   EventNotification asEventNotification();
       
    25 }