For java client, yes, you can set the console to never timeout but it affects all users
Admin page >> Servers >> select your site and click Edit Site properties
Set the console timeout to Never or up to 1 hour, you can go with what you need
See here for tips on doing it for the web based browser login:
How to extend the timeout on the SEPM Web based console