but the server side do not work(it compiles,but get runtime error when client tries to do rpc call)
object autowireServer extends autowire.Server[ByteBuffer, Pickler, Pickler]{
override def read[R: Pickler](p: ByteBuffer) = Unpickle[R].fromBytes(p)
override def write[R: Pickler](r: R) = Pickle.intoBytes(r)
@inline
final def run[t](apiImpl: t, // damn! this can not be made generic
reqPathList: List[String],
reqBodyBytes: ByteString): Future[ByteBuffer] = {
lg("atw reqPathList:"+reqPathList)
this.route[t](apiImpl)( // the problem is route[t]
autowire.Core.Request(
reqPathList,
read[Map[String, ByteBuffer]](reqBodyBytes.asByteBuffer))
)
}
}
even if i inline it
the error is
scala.MatchError: Request(List(rpcAuthedOlogx, tst),Map()) (of class autowire.Core$Request)
at scala.PartialFunction$$anon$1.apply(PartialFunction.scala:254)
at scala.PartialFunction$$anon$1.apply(PartialFunction.scala:252)
at jvmUtils$akkaHttpUtil$rpc_server$autowireServerCls$$anonfun$run$1.applyOrElse(jvmUtils.scala:246)
Type parameters for client here worked
but the server side do not work(it compiles,but get runtime error when client tries to do rpc call)
even if i inline it
the error is