From 183c0522c75f18db73d9ebfef4a91e367a2f35e5 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Wed, 21 Dec 2022 19:59:11 +0100 Subject: [PATCH] Update the asynchronous notifications example so it compiles --- documentation/src/docs/examples/async-notify/simple.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/documentation/src/docs/examples/async-notify/simple.java b/documentation/src/docs/examples/async-notify/simple.java index adb850f9b..37eedd46e 100644 --- a/documentation/src/docs/examples/async-notify/simple.java +++ b/documentation/src/docs/examples/async-notify/simple.java @@ -1,12 +1,14 @@ PGConnection connection = DriverManager.getConnection(url).unwrap(PGConnection.class); // <1> -connection.addListener(new PGNotificationListener() { // <2> +connection.addNotificationListener(new PGNotificationListener() { // <2> - void notification(int processId, String channelName, String payload) { + @Override + public void notification(int processId, String channelName, String payload) { System.out.println("Received Notification: " + processId + ", " + channelName + ", " + payload); // <3> } - void closed() { // <4> + @Override + public void closed() { // <4> // initiate reconnection & restart listening }