Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Automatic logout function in eclipse(Automatic logout function in eclipse ?)
Automatic logout function in eclipse [message #759106] Sat, 26 November 2011 13:15 Go to next message
klas-andersen is currently offline klas-andersenFriend
Messages: 1
Registered: November 2011
Junior Member
Hey there.

So im making a little program in eclipse. But i want the user to be automatically logged out if he's idle for xxx min. Any help on what code i need ? and where i need to implement it (main class?).

Thx for any help Wink
Re: Automatic logout function in eclipse [message #759219 is a reply to message #759106] Sun, 27 November 2011 19:05 Go to previous message
Michael Pellaton is currently offline Michael PellatonFriend
Messages: 289
Registered: July 2009
Senior Member
Hi

The equivalent to the main class in a RCP application is the class
implementing IApplication. But I assume you don't need to do anything
in here.

The tricky part seems to be the part that detects inacativity. It
depends a bit on how exactly the detection and the logout should
happen (is moving the mouse an activity? or only when the user runs
some command in the application? Should the logout occur automatically
after x minutes? or is it enough if the logout ocurs when he attempts
to do something after some time? ...).

Anyhow, if I were you, I'd look at the Jobs API [1]. It lets you create
a job that is run at a configurable frequency.

Closing the application [2]: Platform.getWorkbench().close;

[1] http://www.eclipse.org/articles/Article-Concurrency/jobs-api.html
[2]
http://help.eclipse.org/indigo/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/ui/IWorkbench.html

HTH
Michael
Previous Topic:How to setup new template
Next Topic:Which version of WindowBuilder Pro to use ??
Goto Forum:
  


Current Time: Sat Apr 20 03:14:57 GMT 2024

Powered by FUDForum. Page generated in 0.08300 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top