Coverage Summary for Class: RskJsonRpcRequest (co.rsk.rpc.modules)

Class Class, % Method, % Line, %
RskJsonRpcRequest 0% (0/1) 0% (0/1) 0% (0/1)


1 /* 2  * This file is part of RskJ 3  * Copyright (C) 2018 RSK Labs Ltd. 4  * 5  * This program is free software: you can redistribute it and/or modify 6  * it under the terms of the GNU Lesser General Public License as published by 7  * the Free Software Foundation, either version 3 of the License, or 8  * (at your option) any later version. 9  * 10  * This program is distributed in the hope that it will be useful, 11  * but WITHOUT ANY WARRANTY; without even the implied warranty of 12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13  * GNU Lesser General Public License for more details. 14  * 15  * You should have received a copy of the GNU Lesser General Public License 16  * along with this program. If not, see <http://www.gnu.org/licenses/>. 17  */ 18 package co.rsk.rpc.modules; 19  20 import co.rsk.jsonrpc.*; 21 import co.rsk.rpc.modules.eth.subscribe.EthSubscribeRequest; 22 import co.rsk.rpc.modules.eth.subscribe.EthUnsubscribeRequest; 23 import com.fasterxml.jackson.annotation.JsonSubTypes; 24 import com.fasterxml.jackson.annotation.JsonTypeInfo; 25 import io.netty.channel.ChannelHandlerContext; 26  27 /** 28  * This is the base class for RSK supported JSON-RPC requests. 29  */ 30 @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "method", visible = true) 31 @JsonSubTypes({ 32  @JsonSubTypes.Type(value = EthSubscribeRequest.class, name = "eth_subscribe"), 33  @JsonSubTypes.Type(value = EthUnsubscribeRequest.class, name = "eth_unsubscribe"), 34 }) 35 public abstract class RskJsonRpcRequest extends JsonRpcRequest<RskJsonRpcMethod> { 36  public RskJsonRpcRequest( 37  JsonRpcVersion version, 38  RskJsonRpcMethod method, 39  int id) { 40  super(version, method, id); 41  } 42  43  /** 44  * Inheritors should implement this method by delegating to the corresponding visitor method. 45  */ 46  public abstract JsonRpcResultOrError accept(RskJsonRpcRequestVisitor visitor, ChannelHandlerContext ctx); 47 }