private < I extends Message , O extends Message > ListenableFuture < JsonRpcResponse > invoke ( ServerMethod < I , O > method , JsonObject parameter , JsonElement id ) { I request ; try { request = ( I ) Messages . fromJson ( method . inputBuilder ( ) , parameter ) ; } catch ( Exception e ) { serverLogger . logServerFailure ( method , e ) ; SettableFuture < JsonRpcResponse > future = SettableFuture . create ( ) ; future . setException ( e ) ; return future ; } ListenableFuture < O > response = method . invoke ( request ) ; return Futures . transform ( response , new JsonConverter ( id ) , TRANSFORM_EXECUTOR ) ; }
Actually invokes the server method .