Constructs a new service method instance.
Parameters:
name |
string |
Method name |
type |
string | undefined |
Method type, usually |
requestType |
string |
Request message type |
responseType |
string |
Response message type |
requestStream |
boolean | Object.<string, *> |
optional
Whether the request is streamed |
responseStream |
boolean | Object.<string, *> |
optional
Whether the response is streamed |
options |
Object.<string, *> |
optional
Declared options |
comment |
string |
optional
The comment for this method |
parsedOptions |
Array.<Object.<string, *>> |
optional
Declared options, properly parsed into objects |
Extends
Members
-
Comment for this method
-
Defining file name.
-
Full name including leading dot.
-
Unique name within its namespace.
-
Options.
-
Parent namespace.
-
Options properly parsed into objects
-
gRPC-style method path.
-
Whether requests are streamed or not.
-
Request type.
-
Whether already resolved or not.
-
Resolved request type.
-
Resolved response type.
-
Whether responses are streamed or not.
-
Response type.
-
Reference to the root namespace.
-
Method type.
Methods
-
Gets an option value.
Parameters:
namestring Option name
Returns:
* Option value or undefinedif not set -
Called when this object is added to a parent.
Parameters:
parentReflectionObject Parent added to
Returns:
undefined -
Called when this object is removed from a parent.
Parameters:
parentReflectionObject Parent removed from
Returns:
undefined -
inherited resolve(){ ReflectionObject }
-
Resolves this objects type references.
Returns:
ReflectionObject this -
inherited setOption(name, value, ifNotSet){ ReflectionObject }
-
Sets an option.
Parameters:
namestring Option name
value* Option value
ifNotSetboolean | undefined optional Sets the option only if it isn't currently set
Returns:
ReflectionObject this -
inherited setOptions(options, ifNotSet){ ReflectionObject }
-
Sets multiple options.
Parameters:
optionsObject.<string, *> Options to set
ifNotSetboolean optional Sets an option only if it isn't currently set
Returns:
ReflectionObject this -
inherited setParsedOption(name, value, propName){ ReflectionObject }
-
Sets a parsed option.
Parameters:
namestring parsed Option name
value* Option value
propNamestring dot '.' delimited full path of property within the option to set. if undefined\empty, will add a new option with that value
Returns:
ReflectionObject this -
Converts this method to a method descriptor.
Parameters:
toJSONOptionsIToJSONOptions optional JSON conversion options
Returns:
IMethod Method descriptor -
Converts this instance to its string representation.
Returns:
string Class name[, space, full name] -
Constructs a method from a method descriptor.
Parameters:
namestring Method name
jsonIMethod Method descriptor
Throws:
TypeError If arguments are invalid
Returns:
Method Created method