Loading...
Searching...
No Matches
BulkRequest.idl
/* SPDX-License-Identifier: BSD-3-Clause */
/*
* Copyright 2010 Raritan Inc. All rights reserved.
*/
/** Bulk RPC */
module bulkrpc {
/** JSON-RPC Request (old format) */
structure Request {
string rid; ///< JSON resource ID (URI path)
string json; ///< Request in JSON-RPC format
};
/** JSON-RPC Response (old format) */
structure Response {
string json; ///< Response in JSON-RPC format
int statcode; ///< HTTP Status Code
};
/** Plain JSON object; used without further encoding in JSON-RPC requests */
opaque JsonObject;
/** Bulk Request Interface */
interface BulkRequest {
/** JSON-RPC Request */
structure Request {
string rid; ///< JSON resource ID (URI path)
JsonObject json; ///< Request in JSON-RPC format
};
/** JSON-RPC Response */
structure Response {
JsonObject json; ///< Response in JSON-RPC format
int statcode; ///< HTTP Status Code
};
/**
* Performs a Bulk Request in old format (deprectated).
*
* Bulk requests are used to perform multiple JSON-RPC requests at
* once, i.e. with a single HTTP POST request.
*
* @param requests List of RPC requests
* @param responses Result: List of RPC responses
*/
void performRequest(in vector<bulkrpc.Request> requests,
out vector<bulkrpc.Response> responses);
/**
* Performs a Bulk Request.
*
* Bulk requests are used to perform multiple JSON-RPC requests at
* once, i.e. with a single HTTP POST request.
*
* @param requests List of RPC requests
* @param responses Result: List of RPC responses
*/
void performBulk(in vector<Request> requests,
out vector<Response> responses);
/**
* Performs a Bulk Request with Timeout.
*
* @warning This method is currently not supported!
*
* Bulk requests are used to perform multiple JSON-RPC requests at
* once, i.e. with a single HTTP POST request. Processing will be
* aborted early if the timeout is exceeded. In this case the response
* list will be shorter than the requests list. Requests without
* response have not been processed and must be resent.
*
* @param requests List of RPC requests
* @param responses Result: List of RPC responses
* @param timeoutMs Maximum processing time in milliseconds
*
* @note Requests are processed atomically, and the timeout is only
* checked between requests. The total processing time may be
* slightly longer than the specified timeout.
*/
void performBulkTimeout(in vector<Request> requests,
out vector<Response> responses,
in int timeoutMs);
};
}
bulkrpc::BulkRequest
Bulk Request Interface.
Definition BulkRequest.idl:25
bulkrpc::BulkRequest::performBulk
void performBulk(in vector< Request > requests, out vector< Response > responses)
Performs a Bulk Request.
bulkrpc::BulkRequest::performRequest
void performRequest(in vector< bulkrpc::Request > requests, out vector< bulkrpc::Response > responses)
Performs a Bulk Request in old format (deprectated).
bulkrpc::BulkRequest::performBulkTimeout
void performBulkTimeout(in vector< Request > requests, out vector< Response > responses, in int timeoutMs)
Performs a Bulk Request with Timeout.
bulkrpc
Bulk RPC.
Definition BulkRequest.idl:7
bulkrpc::JsonObject
opaque JsonObject
Plain JSON object; used without further encoding in JSON-RPC requests.
Definition BulkRequest.idl:22
bulkrpc::BulkRequest::Request
JSON-RPC Request.
Definition BulkRequest.idl:28
bulkrpc::BulkRequest::Request::rid
string rid
JSON resource ID (URI path)
Definition BulkRequest.idl:29
bulkrpc::BulkRequest::Request::json
JsonObject json
Request in JSON-RPC format.
Definition BulkRequest.idl:30
bulkrpc::BulkRequest::Response
JSON-RPC Response.
Definition BulkRequest.idl:34
bulkrpc::BulkRequest::Response::statcode
int statcode
HTTP Status Code.
Definition BulkRequest.idl:36
bulkrpc::BulkRequest::Response::json
JsonObject json
Response in JSON-RPC format.
Definition BulkRequest.idl:35
bulkrpc::Request
JSON-RPC Request (old format)
Definition BulkRequest.idl:10
bulkrpc::Request::rid
string rid
JSON resource ID (URI path)
Definition BulkRequest.idl:11
bulkrpc::Request::json
string json
Request in JSON-RPC format.
Definition BulkRequest.idl:12
bulkrpc::Response
JSON-RPC Response (old format)
Definition BulkRequest.idl:16
bulkrpc::Response::statcode
int statcode
HTTP Status Code.
Definition BulkRequest.idl:18
bulkrpc::Response::json
string json
Response in JSON-RPC format.
Definition BulkRequest.idl:17