-
Notifications
You must be signed in to change notification settings - Fork 440
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #268 from simbag/parallel-batch-processing
Added ability to handle JSON-RPC batch requests in parallel
- Loading branch information
Showing
9 changed files
with
455 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package com.googlecode.jsonrpc4j; | ||
|
||
import com.fasterxml.jackson.databind.JsonNode; | ||
|
||
/** | ||
* Contains the JSON-RPC answer in {@code response} | ||
* {@code exceptionToRethrow} contains exception, which should be thrown when property {@code rethrowExceptions} | ||
* is active | ||
*/ | ||
public class JsonResponse { | ||
private JsonNode response; | ||
private int code; | ||
private RuntimeException exceptionToRethrow; | ||
|
||
public JsonResponse() { | ||
} | ||
|
||
public JsonResponse(JsonNode response, int code) { | ||
this.response = response; | ||
this.code = code; | ||
} | ||
|
||
public JsonNode getResponse() { | ||
return response; | ||
} | ||
|
||
public void setResponse(JsonNode response) { | ||
this.response = response; | ||
} | ||
|
||
public int getCode() { | ||
return code; | ||
} | ||
|
||
public void setCode(int code) { | ||
this.code = code; | ||
} | ||
|
||
public RuntimeException getExceptionToRethrow() { | ||
return exceptionToRethrow; | ||
} | ||
|
||
public void setExceptionToRethrow(RuntimeException exceptionToRethrow) { | ||
this.exceptionToRethrow = exceptionToRethrow; | ||
} | ||
} |
Oops, something went wrong.