RpcProtocol Class

An application protocol for an RPC interface.

Extended by

Methods

Name Description
constructor(configuration: RpcConfiguration): RpcProtocol Constructs a protocol.  
fulfill(request: SerializedRpcRequest): Promise<RpcRequestFulfillment> Obtains the implementation result on the backend for an RPC operation request.  
getCode(status: RpcRequestStatus): number Override to supply the protocol-specific code corresponding to a status value.  
getOperationFromPath(path: string): SerializedRpcOperation Override to supply the operation for a protocol-specific path value.  
getStatus(code: number): RpcRequestStatus Override to supply the status corresponding to a protocol-specific code value.  
inflateToken(tokenFromBody: IModelRpcProps, _request: SerializedRpcRequest): IModelRpcProps If checkToken is true, will be called on the backend to inflate the IModelRpcProps for each request.  
serialize(request: RpcRequest<any>): Promise<SerializedRpcRequest> Serializes a request.  
supplyPathForOperation(operation: RpcOperation, _request: undefined | RpcRequest<any>): string Override to supply the protocol-specific path value for an RPC operation.  

Properties

Name Type Description
checkToken boolean Used by protocols that can transmit IModelRpcProps values natively.  
configuration Readonly RpcConfiguration The configuration for the protocol.  
events Readonly BeEvent<RpcProtocolEventHandler> Events raised by the protocol.  
events StaticReadonly BeEvent<RpcProtocolEventHandler> Events raised by all protocols.  
invocationType Readonly undefined The RPC invocation class for this protocol.  
preserveStreams boolean Used by protocols that can transmit stream values natively.  
protocolVersion StaticReadonly "1" A version code that identifies the RPC protocol capabilties of this endpoint.  
protocolVersionHeaderName string The name of the RPC protocol version header.  
requestType AbstractReadonly undefined The RPC request class for this protocol.  
serializedClientRequestContextHeaderNames SerializedClientRequestContext    
transferChunkThreshold number If greater than zero, specifies where to break large binary request payloads.  

Defined in

Last Updated: 29 November, 2022