Skip to content

Commit

Permalink
Move jsonrpc package to org.consensusj
Browse files Browse the repository at this point in the history
  • Loading branch information
msgilligan committed Dec 10, 2017
1 parent 2b9b5aa commit 36d24fe
Show file tree
Hide file tree
Showing 49 changed files with 92 additions and 85 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.msgilligan.bitcoinj.cli;

import com.msgilligan.jsonrpc.JsonRPCException;
import org.consensusj.jsonrpc.JsonRPCException;

import java.io.IOException;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.msgilligan.bitcoinj.cli;

import com.msgilligan.jsonrpc.JsonRPCException;
import org.consensusj.jsonrpc.JsonRPCException;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.DefaultParser;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.msgilligan.bitcoinj.cli;

import com.msgilligan.jsonrpc.JsonRPCException;
import org.consensusj.jsonrpc.JsonRPCException;

import java.io.IOException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.msgilligan.bitcoinj.json.pojo.BlockChainInfo;
import com.msgilligan.bitcoinj.json.pojo.NetworkInfo;
import com.msgilligan.jsonrpc.JsonRPCException;
import org.consensusj.jsonrpc.JsonRPCException;

import java.io.IOException;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.msgilligan.bitcoinj.proxy;

import com.msgilligan.jsonrpc.ratpack.JsonRpcClientModule;
import com.msgilligan.jsonrpc.ratpack.RpcProxyHandler;
import org.consensusj.jsonrpc.ratpack.JsonRpcClientModule;
import org.consensusj.jsonrpc.ratpack.RpcProxyHandler;

/**
* Guice Module to create handlers and client for JSON-RPC Proxy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.msgilligan.bitcoinj.proxy;

import com.msgilligan.jsonrpc.JsonRpcRequest;
import com.msgilligan.jsonrpc.ratpack.JsonRpcClient;
import org.consensusj.jsonrpc.JsonRpcRequest;
import org.consensusj.jsonrpc.ratpack.JsonRpcClient;
import ratpack.handling.Context;
import ratpack.handling.Handler;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.msgilligan.bitcoinj.proxy;

import com.msgilligan.jsonrpc.JsonRpcRequest;
import com.msgilligan.jsonrpc.ratpack.JsonRpcClient;
import org.consensusj.jsonrpc.JsonRpcRequest;
import org.consensusj.jsonrpc.ratpack.JsonRpcClient;
import ratpack.handling.Context;
import ratpack.handling.Handler;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.msgilligan.bitcoinj.proxy;

import com.msgilligan.bitcoinj.rpc.RPCConfig;
import com.msgilligan.jsonrpc.ratpack.RpcProxyHandler;
import org.consensusj.jsonrpc.ratpack.RpcProxyHandler;
import ratpack.guice.Guice;
import ratpack.server.BaseDir;
import ratpack.server.RatpackServer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.msgilligan.jsonrpc.ratpack;
package org.consensusj.jsonrpc.ratpack;

import com.fasterxml.jackson.databind.JsonNode;
import com.msgilligan.jsonrpc.JsonRpcRequest;
import com.msgilligan.jsonrpc.JsonRpcResponse;
import org.consensusj.jsonrpc.JsonRpcRequest;
import org.consensusj.jsonrpc.JsonRpcResponse;
import ratpack.exec.Promise;
import retrofit2.http.Body;
import retrofit2.http.POST;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.msgilligan.jsonrpc.ratpack;
package org.consensusj.jsonrpc.ratpack;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
import com.google.inject.Provides;
import com.msgilligan.bitcoinj.json.conversion.RpcClientModule;
import com.msgilligan.bitcoinj.json.conversion.RpcServerModule;
import com.msgilligan.jsonrpc.ratpack.authext.BasicAuthCallFactory;
import org.consensusj.jsonrpc.ratpack.authext.BasicAuthCallFactory;
import com.msgilligan.bitcoinj.rpc.RPCConfig;
import ratpack.guice.ConfigurableModule;
import ratpack.retrofit.RatpackRetrofit;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.msgilligan.jsonrpc.ratpack;
package org.consensusj.jsonrpc.ratpack;

import com.msgilligan.jsonrpc.JsonRpcRequest;
import org.consensusj.jsonrpc.JsonRpcRequest;
import ratpack.handling.Context;
import ratpack.handling.Handler;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.msgilligan.jsonrpc.ratpack.authext;
package org.consensusj.jsonrpc.ratpack.authext;

import com.msgilligan.jsonrpc.util.Base64;
import org.consensusj.jsonrpc.util.Base64;
import okhttp3.Call;
import okhttp3.Request;
import ratpack.retrofit.internal.RatpackCallFactory;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
* An asynchronous JSON-RPC client for Ratpack (using Jackson and Retrofit)
*/
package com.msgilligan.jsonrpc.ratpack;
package org.consensusj.jsonrpc.ratpack;
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.msgilligan.bitcoinj

import com.msgilligan.bitcoinj.rpc.BitcoinExtendedClient
import com.msgilligan.jsonrpc.Loggable
import org.consensusj.jsonrpc.Loggable
import com.msgilligan.bitcoinj.rpc.RPCURI
import com.msgilligan.bitcoinj.rpc.test.TestServers
import com.msgilligan.bitcoinj.test.BTCTestSupport
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.msgilligan.bitcoinj

import com.msgilligan.bitcoinj.rpc.BitcoinExtendedClient
import com.msgilligan.jsonrpc.Loggable
import org.consensusj.jsonrpc.Loggable
import com.msgilligan.bitcoinj.rpc.RPCURI
import com.msgilligan.bitcoinj.test.BTCTestSupport
import com.msgilligan.bitcoinj.test.RegTestFundingSource
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.msgilligan.bitcoinj.alpha

import com.msgilligan.jsonrpc.DynamicRPCClient
import org.consensusj.jsonrpc.DynamicRPCClient
import com.msgilligan.bitcoinj.rpc.RPCURI
import com.msgilligan.bitcoinj.rpc.test.TestServers
import org.bitcoinj.core.Address
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.msgilligan.bitcoinj.integ

import com.msgilligan.jsonrpc.JsonRPCStatusException
import org.consensusj.jsonrpc.JsonRPCStatusException
import org.bitcoinj.core.Address
import org.bitcoinj.core.BlockChain
import org.bitcoinj.core.Coin
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.msgilligan.bitcoinj.rpc

import com.msgilligan.bitcoinj.rpc.test.TestServers
import com.msgilligan.jsonrpc.DynamicRPCClient
import com.msgilligan.jsonrpc.JsonRPCStatusException
import org.consensusj.jsonrpc.DynamicRPCClient
import org.consensusj.jsonrpc.JsonRPCStatusException
import spock.lang.Ignore
import spock.lang.Shared
import spock.lang.Specification
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.msgilligan.bitcoinj.rpc

import com.msgilligan.bitcoinj.rpc.bitcoind.BitcoinConfFile
import com.msgilligan.jsonrpc.DynamicRPCFallback
import org.consensusj.jsonrpc.DynamicRPCFallback

/**
* Bitcoin RPC client for scripting
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.msgilligan.bitcoinj.rpc

import com.msgilligan.jsonrpc.Loggable
import org.consensusj.jsonrpc.Loggable

/**
* Wait for synchronization with a reference source of block height.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.msgilligan.bitcoinj.test

import com.msgilligan.bitcoinj.rpc.BitcoinClientDelegate
import com.msgilligan.jsonrpc.Loggable
import org.consensusj.jsonrpc.Loggable
import com.msgilligan.bitcoinj.json.conversion.BitcoinMath
import org.bitcoinj.core.Coin

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.msgilligan.bitcoinj.test

import com.msgilligan.bitcoinj.json.pojo.RawTransactionInfo
import com.msgilligan.jsonrpc.JsonRPCStatusException
import org.consensusj.jsonrpc.JsonRPCStatusException
import org.bitcoinj.core.Coin
import org.bitcoinj.core.PeerGroup
import org.bitcoinj.core.Sha256Hash
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.msgilligan.ethereum.rpc

import com.msgilligan.jsonrpc.DynamicRPCFallback
import org.consensusj.jsonrpc.DynamicRPCFallback

/**
* Use `methodMissing` to implement Ethereum RPC calls dynamically
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.msgilligan.namecoinj.rpc

import com.msgilligan.jsonrpc.DynamicRPCFallback
import org.consensusj.jsonrpc.DynamicRPCFallback

/**
* Namecoin RPC client for scripting
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
package com.msgilligan.jsonrpc

package org.consensusj.jsonrpc
/**
* Use Groovy <code>methodMissing</code> to allow *any* JSON-RPC call to be made
* as <code>client.rpcMethod(args)</code>. Note that calling a non-existent method
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
package com.msgilligan.jsonrpc

package org.consensusj.jsonrpc
/**
* Trait for adding dynamic RPC method fallback to any RPC client
*/
Expand All @@ -12,7 +11,7 @@ trait DynamicRPCFallback implements UntypedRPCClient {
* @param name The JSON-RPC method name
* @param args JSON-RPC arguments
* @return an object containing the JSON-RPC response.result
* @throws com.msgilligan.jsonrpc.JsonRPCStatusException
* @throws org.consensusj.jsonrpc.JsonRPCStatusException
*/
def methodMissing(String name, def args) {
Object result = this.send(name, args as List)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.msgilligan.jsonrpc
package org.consensusj.jsonrpc

import org.slf4j.Logger
import org.slf4j.LoggerFactory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
import com.msgilligan.bitcoinj.json.pojo.UnspentOutput;
import com.msgilligan.bitcoinj.json.conversion.RpcClientModule;
import com.msgilligan.bitcoinj.json.pojo.WalletTransactionInfo;
import com.msgilligan.jsonrpc.JsonRPCException;
import com.msgilligan.jsonrpc.JsonRPCStatusException;
import com.msgilligan.jsonrpc.RPCClient;
import org.consensusj.jsonrpc.JsonRPCException;
import org.consensusj.jsonrpc.JsonRPCStatusException;
import org.consensusj.jsonrpc.RPCClient;
import org.bitcoinj.core.Address;
import org.bitcoinj.core.Block;
import org.bitcoinj.core.Coin;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import com.msgilligan.bitcoinj.json.pojo.Outpoint;
import com.msgilligan.bitcoinj.json.pojo.SignedRawTransaction;
import com.msgilligan.bitcoinj.json.pojo.UnspentOutput;
import com.msgilligan.jsonrpc.JsonRPCStatusException;
import org.consensusj.jsonrpc.JsonRPCStatusException;
import org.bitcoinj.core.Address;
import org.bitcoinj.core.Coin;
import org.bitcoinj.core.ECKey;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.msgilligan.bitcoinj.test;

import com.msgilligan.bitcoinj.rpc.BitcoinClient;
import com.msgilligan.jsonrpc.JsonRPCException;
import org.consensusj.jsonrpc.JsonRPCException;
import org.bitcoinj.core.Sha256Hash;

import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.msgilligan.bitcoinj.test;

import com.msgilligan.bitcoinj.rpc.BitcoinExtendedClient;
import com.msgilligan.jsonrpc.JsonRPCException;
import org.consensusj.jsonrpc.JsonRPCException;
import com.msgilligan.bitcoinj.json.pojo.Outpoint;
import com.msgilligan.bitcoinj.json.pojo.SignedRawTransaction;
import com.msgilligan.bitcoinj.json.pojo.TxOutInfo;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.msgilligan.ethereum.rpc;

import com.msgilligan.jsonrpc.JsonRPCStatusException;
import com.msgilligan.jsonrpc.JsonRpcRequest;
import com.msgilligan.jsonrpc.RPCClient;
import org.consensusj.jsonrpc.JsonRPCStatusException;
import org.consensusj.jsonrpc.JsonRpcRequest;
import org.consensusj.jsonrpc.RPCClient;

import java.io.IOException;
import java.math.BigInteger;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.msgilligan.namecoinj.cli;

import com.msgilligan.jsonrpc.JsonRPCStatusException;
import org.consensusj.jsonrpc.JsonRPCStatusException;
import com.msgilligan.namecoinj.json.pojo.NameData;
import com.msgilligan.namecoinj.rpc.NamecoinClient;
import org.bitcoinj.core.Address;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.msgilligan.namecoinj.rpc;

import com.msgilligan.bitcoinj.rpc.BitcoinClient;
import com.msgilligan.jsonrpc.JsonRPCStatusException;
import org.consensusj.jsonrpc.JsonRPCStatusException;
import com.msgilligan.bitcoinj.rpc.RPCConfig;
import com.msgilligan.bitcoinj.rpc.bitcoind.AppDataDirectory;
import com.msgilligan.bitcoinj.rpc.bitcoind.BitcoinConfFile;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.msgilligan.jsonrpc;
package org.consensusj.jsonrpc;

import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.ObjectMapper;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.msgilligan.jsonrpc;
package org.consensusj.jsonrpc;

import java.io.IOException;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.msgilligan.jsonrpc;
package org.consensusj.jsonrpc;

/**
* JSON-RPC returned HTTP status other than 200
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.msgilligan.jsonrpc;
package org.consensusj.jsonrpc;

/**
* JSON-RPC Error Object POJO
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.msgilligan.jsonrpc;
package org.consensusj.jsonrpc;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.msgilligan.jsonrpc;
package org.consensusj.jsonrpc;

/**
* = JSON-RPC Response POJO
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.msgilligan.jsonrpc;
package org.consensusj.jsonrpc;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JavaType;
import com.msgilligan.bitcoinj.rpc.BitcoinClient;
import com.msgilligan.jsonrpc.util.Base64;
import org.consensusj.jsonrpc.util.Base64;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.msgilligan.jsonrpc;
package org.consensusj.jsonrpc;

import java.io.IOException;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
* ....
*
*/
package com.msgilligan.jsonrpc;
package org.consensusj.jsonrpc;
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
//package android.util;
/* Copy of android.util.Base64 for use with rpc */

package com.msgilligan.jsonrpc.util;
package org.consensusj.jsonrpc.util;
import java.io.UnsupportedEncodingException;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
* Utility support classes for JSON-RPC
*/
package com.msgilligan.jsonrpc.util;
package org.consensusj.jsonrpc.util;
Loading

0 comments on commit 36d24fe

Please sign in to comment.