[ 
https://issues.apache.org/jira/browse/WICKET-4660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14096999#comment-14096999
 ] 

Martin Grigorov edited comment on WICKET-4660 at 8/14/14 2:26 PM:
------------------------------------------------------------------

Usage:

{code}
@Subscribe
public void internalEvent(AjaxRequestTarget target, AtmosphereInternalEvent 
event)
{
        AtmosphereResourceEvent resourceEvent = event.getEvent();
        switch (event.getType())
        {
                case Disconnect:
                        // ..
                        break;
                case Throwable:
                        // ...
                        break;
        }
}
{code}

Additionally you need to enable it explicitly because otherwise it may cause 
slow down for applications which do not need these notifications. See 
org.apache.wicket.atmosphere.EventBus#setWantAtmosphereNotifications(boolean)


was (Author: mgrigorov):
Usage:

{code}
@Subscribe
public void internalEvent(AjaxRequestTarget target, AtmosphereInternalEvent 
event)
{
        switch (event.getType())
        {
                case Disconnect: 
                        //...
                        break;
                case Throwable:
                        // ...
                        break;
        }
}
{code}

Additionally you need to enable it explicitly because otherwise it may cause 
slow down for applications which do not need these notifications. See 
org.apache.wicket.atmosphere.EventBus#setWantAtmosphereNotifications(boolean)

> Make it possible to notify about Atmosphere internal events
> -----------------------------------------------------------
>
>                 Key: WICKET-4660
>                 URL: https://issues.apache.org/jira/browse/WICKET-4660
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-atmosphere
>    Affects Versions: 6.0.0-beta3
>            Reporter: Pouyan Zaxar
>            Assignee: Martin Grigorov
>             Fix For: 7.0.0-M3, 6.17.0
>
>
> Add events to AtmosphereBehavior so that components get informed of current 
> AtmosphereResourceEventListener events.
> I suggest another annotation such as @Listen applicable to a function with 
> signature:
> #listen(TYPE,AtmosphereResourceEvent) 
> where TYPE is an enum containing various events (onSuspend / onResume / etc.)



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to