----- Original Message ----- 
From: "jasbir_dadyal" <[EMAIL PROTECTED]>
To: <flexcoders@yahoogroups.com>
Sent: Tuesday, November 04, 2008 1:40 PM
Subject: [flexcoders] Getting all the fired events in flex application.


> Hi,
>    In my application I am working on session management.On session
> timeout i want to get all fired events(events that are currently
> running in a application) and stop them.
>
> Approach that I have implemented for session management.
>
> There is a timer on web layer which listens to every mouse click.
> For every mouse click anywhere in a application it checks the
> idleTimeout.if it exceeds the specified time it dispatches
> LogOutEvent which hits the service layer and invalidate the
> session.At the same time on web layer all the dictionaries that are
> stored in ModelLocator are set to null.

You should have a timer set to the timeout period and leave that running. If 
the user makes a mouse click, then either reset the timer, or set a 
mouseclick flag.

If you reset the timer on each mouseclick: if the timer ever runs to 
completion issue the logogout event.
If you record the mouseclick by setting a flag to say the user is active: 
When the timer runs out  look for a mouse click during the timeout period 
(flag set). If the flag is set, clear the flag and start the timer again. If 
the flag is unset, issue a timeout event.

You may wish to reset the application state to 'LoggedOut' when the logout 
event is handled to prevent further unwanted user interactions.

Paul

> Problem:
> Suppose user leaves system for a specified time and comes back and
> clicks on some button.By clicking on that button it fires a custom
> event and at the same time it checks for idleTimeOut.If it exceeds
> that time then it dispatches another event i.e Logout event.
>
> Now here two events are dispatched on one click of button.
>
> Logout event will invalidate session on service layer and nullify all
> the web dictionaries.At this time if another event which was
> dispathced with logout event is accessing some dictionary will throw
> a nullpointer exception.
>
> Question:
>
> Is there any way through which I can get all the fired events.With
> this on Logout event I can get all those events and Cancel them
> manually.
>
> OR
>
> Is there any better approach.
>
> Any thoughts on this will be very helpful for me.
> Thanks in advance
> Jasbir Singh
>
>
>
>
>
>
> ------------------------------------
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Alternative FAQ location: 
> https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
> Search Archives: 
> http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups 
> Links
>
>
>

Reply via email to