Class MethodDescriptor<REQ, RESP>
Constructors
constructor
- new MethodDescriptor<REQ, RESP>(name: string, methodType: string, requestType: new (...args: unknown[]) => REQ, responseType: new (...args: unknown[]) => RESP, requestSerializeFn: any, responseDeserializeFn: any): MethodDescriptor<REQ, RESP>
Type parameters
Parameters
name: string
methodType: string
requestType: new (...args: unknown[]) => REQ
- new (...args: unknown[]): REQ
responseType: new (...args: unknown[]) => RESP
- new (...args: unknown[]): RESP
requestSerializeFn: any
responseDeserializeFn: any
Methods
createRequest
Parameters
requestMessage: REQ
Optional metadata: Metadata
Returns Request<REQ, RESP>
createUnaryResponse
Parameters
responseMessage: RESP
Optional metadata: Metadata
Optional status: Status
getMethodType
Returns string
getName
Returns string
getRequestMessageCtor
- getRequestMessageCtor(): new (...args: unknown[]) => REQ
Returns new (...args: unknown[]) => REQ
- new (...args: unknown[]): REQ
getRequestSerializeFn
- getRequestSerializeFn(): any
Returns any
getResponseDeserializeFn
- getResponseDeserializeFn(): any
Returns any
getResponseMessageCtor
- getResponseMessageCtor(): new (...args: unknown[]) => RESP
Returns new (...args: unknown[]) => RESP
- new (...args: unknown[]): RESP