Skip to content

Commit 277a19e

Browse files
committed
Merge pull request briandilley#126 from robymus/master
Public constructor for JsonRpcHttpAsyncClient
2 parents 519c9ad + 1d7b145 commit 277a19e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/main/java/com/googlecode/jsonrpc4j/JsonRpcCallback.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
* @param <T> the return type of the JSON-RPC call
1111
*/
12-
interface JsonRpcCallback<T> {
12+
public interface JsonRpcCallback<T> {
1313

1414
/**
1515
* Called if the remote invocation was successful.

src/main/java/com/googlecode/jsonrpc4j/JsonRpcHttpAsyncClient.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public class JsonRpcHttpAsyncClient {
118118
*
119119
* @param serviceUrl the service end-point URL
120120
*/
121-
private JsonRpcHttpAsyncClient(URL serviceUrl) {
121+
public JsonRpcHttpAsyncClient(URL serviceUrl) {
122122
this(new ObjectMapper(), serviceUrl, new HashMap<String, String>());
123123
}
124124

@@ -127,11 +127,11 @@ private JsonRpcHttpAsyncClient(URL serviceUrl) {
127127
* {@code serviceUrl}. The headers provided in the {@code headers} map are added to every request
128128
* made to the {@code serviceUrl}.
129129
*
130-
* @param mapper the {@link ObjectMapper} to use for json<->java conversion
130+
* @param mapper the {@link ObjectMapper} to use for json&lt;-&gt;java conversion
131131
* @param serviceUrl the service end-point URL
132132
* @param headers the headers
133133
*/
134-
private JsonRpcHttpAsyncClient(ObjectMapper mapper, URL serviceUrl, Map<String, String> headers) {
134+
public JsonRpcHttpAsyncClient(ObjectMapper mapper, URL serviceUrl, Map<String, String> headers) {
135135
this.mapper = mapper;
136136
this.serviceUrl = serviceUrl;
137137
this.headers.putAll(headers);
@@ -145,7 +145,7 @@ private JsonRpcHttpAsyncClient(ObjectMapper mapper, URL serviceUrl, Map<String,
145145
* @param serviceUrl the service end-point URL
146146
* @param headers the headers
147147
*/
148-
private JsonRpcHttpAsyncClient(URL serviceUrl, Map<String, String> headers) {
148+
public JsonRpcHttpAsyncClient(URL serviceUrl, Map<String, String> headers) {
149149
this(new ObjectMapper(), serviceUrl, headers);
150150
}
151151

0 commit comments

Comments
 (0)