@@ -91,8 +91,8 @@ protected static ActorRef of(SpawnClient client, String system, String name, Str
9191 * @return an Optional containing, or not, the response object to the Action call
9292 * @since 0.0.1
9393 */
94- public <T extends GeneratedMessageV3 > Optional <Object > invoke (String action , Class <T > outputType ) throws Exception {
95- Optional <Object > res = invokeActor (action , Empty .getDefaultInstance (), outputType , Optional .empty ());
94+ public <T extends GeneratedMessageV3 > Optional <T > invoke (String action , Class <T > outputType ) throws Exception {
95+ Optional <T > res = invokeActor (action , Empty .getDefaultInstance (), outputType , Optional .empty ());
9696 if (res .isPresent () ){
9797 return Optional .of (outputType .cast (res .get ()));
9898 }
@@ -111,8 +111,8 @@ public <T extends GeneratedMessageV3> Optional<Object> invoke(String action, Cl
111111 * @return an Optional containing, or not, the response object to the Action call
112112 * @since 0.0.1
113113 */
114- public <T extends GeneratedMessageV3 > Optional <Object > invoke (String action , Class <T > outputType , InvocationOpts opts ) throws Exception {
115- Optional <Object > res = invokeActor (action , Empty .getDefaultInstance (), outputType , Optional .ofNullable (opts ));
114+ public <T extends GeneratedMessageV3 > Optional <T > invoke (String action , Class <T > outputType , InvocationOpts opts ) throws Exception {
115+ Optional <T > res = invokeActor (action , Empty .getDefaultInstance (), outputType , Optional .ofNullable (opts ));
116116 if (res .isPresent () ){
117117 return Optional .of (outputType .cast (res .get ()));
118118 }
@@ -130,8 +130,8 @@ public <T extends GeneratedMessageV3> Optional<Object> invoke(String action, Cl
130130 * @return an Optional containing, or not, the response object to the Action call
131131 * @since 0.0.1
132132 */
133- public <T extends GeneratedMessageV3 , S extends GeneratedMessageV3 > Optional <Object > invoke (String action , S value , Class <T > outputType ) throws Exception {
134- Optional <Object > res = invokeActor (action , value , outputType , Optional .empty ());
133+ public <T extends GeneratedMessageV3 , S extends GeneratedMessageV3 > Optional <T > invoke (String action , S value , Class <T > outputType ) throws Exception {
134+ Optional <T > res = invokeActor (action , value , outputType , Optional .empty ());
135135 if (res .isPresent () ){
136136 return Optional .of (outputType .cast (res .get ()));
137137 }
@@ -151,8 +151,8 @@ public <T extends GeneratedMessageV3, S extends GeneratedMessageV3> Optional<Obj
151151 * @return an Optional containing, or not, the response object to the Action call
152152 * @since 0.0.1
153153 */
154- public <T extends GeneratedMessageV3 , S extends GeneratedMessageV3 > Optional <Object > invoke (String action , S value , Class <T > outputType , InvocationOpts opts ) throws Exception {
155- Optional <Object > res = invokeActor (action , value , outputType , Optional .ofNullable (opts ));
154+ public <T extends GeneratedMessageV3 , S extends GeneratedMessageV3 > Optional <T > invoke (String action , S value , Class <T > outputType , InvocationOpts opts ) throws Exception {
155+ Optional <T > res = invokeActor (action , value , outputType , Optional .ofNullable (opts ));
156156 if (res .isPresent () ){
157157 return Optional .of (outputType .cast (res .get ()));
158158 }
@@ -248,7 +248,7 @@ public boolean isUnNamedActor() {
248248 return false ;
249249 }
250250
251- private <T extends GeneratedMessageV3 , S extends GeneratedMessageV3 > Optional <Object > invokeActor (
251+ private <T extends GeneratedMessageV3 , S extends GeneratedMessageV3 > Optional <T > invokeActor (
252252 String cmd , S argument , Class <T > outputType , Optional <InvocationOpts > options ) throws Exception {
253253 Protocol .InvocationRequest .Builder invocationRequestBuilder = Protocol .InvocationRequest .newBuilder ();
254254
0 commit comments