webkit
2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
|
Classes | |
class | AlreadyCalledException |
Static Public Member Functions | |
static< Type extends Message > RpcCallback< Type > | specializeCallback (final RpcCallback< Message > originalCallback) |
static< Type extends Message > RpcCallback< Message > | generalizeCallback (final RpcCallback< Type > originalCallback, final Class< Type > originalClass, final Type defaultInstance) |
static< ParameterType > RpcCallback< ParameterType > | newOneTimeCallback (final RpcCallback< ParameterType > originalCallback) |
Grab-bag of utility functions useful when dealing with RPCs.
|
inlinestatic |
Take an
accepting a specific message type and convert it to an
. The generalized callback will accept any message object which has the same descriptor, and will convert it to the correct class before calling the original callback. However, if the generalized callback is given a message with a different descriptor, an exception will be thrown.
|
inlinestatic |
Creates a callback which can only be called once. This may be useful for security, when passing a callback to untrusted code: most callbacks do not expect to be called more than once, so doing so may expose bugs if it is not prevented.
|
inlinestatic |
Take an
and convert it to an
accepting a specific message type. This is always type-safe (parameter type contravariance).