Primary motivation for this release is RPC based REST framework
The biggest breaking change is change of serialization format used by GenCodec
for Option
- migrate carefully!
Changes in RPC framework itself (mostly inspired or needed by REST framework):
- Raw parameters and metadata parameters may be grouped into classes using
@composite
- Method RPC name no longer needs to be the only parameter in first parameter list of
@multi
raw methods. Now it can appear anywhere in the raw method signature but it must be explicitly marked as@methodName
. It may also be inside a@composite
parameter. @methodTag
and@paramTag
now accept default tag value instead of type. This value is injected as effective annotation on real methods/params so there's no need to worry about default tags in annotation processing.@tagged
now acceptswhenUntagged
parameter containing tag value assumed when real method/param is untagged. This fallback tag value is also injected as effective annotation on real method/param.- Brought back requirement that RPC name must be unique among all methods in RPC trait and among all parameters in RPC method.
- Introduced
@rpcNamePrefix
which may be aggregated by method/param tags to effectively allow overloading RPC methods as long as they have different tags. - Introduced
@tried
- raw method annotation which causes results of real methods to be automatically wrapped intoTry
. This catches possible exceptions thrown by real methods and makes it possible to handle them during serialization to raw values. - Implemented reusable infrastructure for easy creation of base companion classes for RPC traits.
- RPC framework now understands
@transientDefault
on RPC method parameters - Raw methods in
RPCFramework
(legacy RPC) now accept a singleRawInvocation
parameter that aggregates method name and argument list.
Changes in annotation processing:
- Introduced
@defaultsToName
meta-annotation forString
-typed annotation parameters.
Changes in serialization (mostly breaking, #74):
Option
no longer serializes to a list - it uses the same format asOpt
, i.e.None
is represented asnull
andSome(null)
is indistinguishable fromNone
- it will deserialize asNone
.Input
andOutput
implementations may fall back to the old list-based format by overridinglegacyOptionEncoding
method.JsonStringInput
andJsonStringOutput
now acceptJsonOptions
- #66. Default serialization of timestamps has changed to emit ISO-formatted UTC-based millisecond-precision timestamp string. Default serialization of byte arrays has changed to emit JSON arrays of numbers instead of HEX strings.- Removed
InputType
and replaced it with simpleisNull
method onInput
@transparent
codecs now delegatenull
deserialization to its underlying codec instead of returning barenull
value.
Other unrelated features:
- Introduced general purpose
Timestamp
class JettyRPCFramework
client now accepts responses bigger than 2MiB - #77