You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Thomas Heigl (Jira)" <ji...@apache.org> on 2020/03/18 12:08:00 UTC

[jira] [Updated] (WICKET-6759) Support disabling onError notification for websockets

     [ https://issues.apache.org/jira/browse/WICKET-6759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Heigl updated WICKET-6759:
---------------------------------
    Description: 
Hi,

WebSocketSettings currently supports disabling the broadcast of `close` events. This toggle has been added because notifications lead to deserialization of the page instance from the page store:
{code:java}
	/**
	 * A function that decides whether to notify the page/resource on
	 * web socket connection closed event.
	 * The page notification leads to deserialization of the page instance from
	 * the page store and sometimes this is not wanted.
	 */
	private Function<Integer, Boolean> notifyOnCloseEvent = (code) -> true; {code}
The same happens for `error` events, but it is not possible to disable the notification.

Would it be possible to add another toggle `setNotifyOnErrorEvent`?

I can provide a PR if necessary.

  was:
Hi,

WebSocketSettings currently supports disabling the broadcast of `close` events. This toggle has been added because notifications lead to deserialization of the page instance from the page store.

The same happens for `error` events, but it is not possible to disable the notification.

Would it be possible to add another toggle `setNotifyOnErrorEvent`?

I can provide a PR if necessary.


> Support disabling onError notification for websockets
> -----------------------------------------------------
>
>                 Key: WICKET-6759
>                 URL: https://issues.apache.org/jira/browse/WICKET-6759
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-native-websocket
>    Affects Versions: 8.7.0
>            Reporter: Thomas Heigl
>            Assignee: Martin Tzvetanov Grigorov
>            Priority: Minor
>
> Hi,
> WebSocketSettings currently supports disabling the broadcast of `close` events. This toggle has been added because notifications lead to deserialization of the page instance from the page store:
> {code:java}
> 	/**
> 	 * A function that decides whether to notify the page/resource on
> 	 * web socket connection closed event.
> 	 * The page notification leads to deserialization of the page instance from
> 	 * the page store and sometimes this is not wanted.
> 	 */
> 	private Function<Integer, Boolean> notifyOnCloseEvent = (code) -> true; {code}
> The same happens for `error` events, but it is not possible to disable the notification.
> Would it be possible to add another toggle `setNotifyOnErrorEvent`?
> I can provide a PR if necessary.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)