# Future-Completable RPC Call

**URL:** <https://forum.inductiveautomation.com/t/future-completable-rpc-call/64833>\
**Category:** Module Development\
**Created:** [October 5, 2022, 5:27am UTC](https://forum.inductiveautomation.com/t/future-completable-rpc-call/64833 "2022-10-05T05:27:30Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![bmusson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmusson/32/87530_2.png) [@bmusson](https://forum.inductiveautomation.com/u/bmusson)\
**Post date:** [October 6, 2022, 7:18pm UTC](https://forum.inductiveautomation.com/t/future-completable-rpc-call/64833/3 "2022-10-06T19:18:01Z")

</div>

Thanks Phil.

Some notes for my future self and others:

1. To push to a designer/client from the gateway, add a notification to the session received from the RPC call using:

```auto
session.addNotification(...)

```

1. To listen for this notification in the designer/client, you first need a GatewayConnection object. _Don't make a new connection_, get one from the _GatewayConnectionManager_.

```auto
new DesignerGatewayConnection(context.getLaunchContext()) # incorrect
GatewayConnectionManager.getInstance() # correct

```

1. In the designer/client, add a push notification listener to the _GatewayConnection_ to handle the notification:

```auto
GatewayConnection connection = GatewayConnectionManager.getInstance();
connection.addPushNotificationListener(...);
connection.removePushNotificationListener(...);

```

---

_[View the full topic](https://forum.inductiveautomation.com/t/future-completable-rpc-call/64833)._
