At the last VUG I did a demo on a plugin that I was working on that gave you some server tools to get a handle to the Application Server, all connected Clients, and start a new Headless Client on the server. Today I have released that as the Robot plugin.
Below are some examples of use:
-Get a list of all the currently connected clients. Control licensing with a SaaS model and allow shutting down other remote clients
-Communicate between clients by making another client run a method
-Run a batch processor on the server getting a list of the connected clients, and disconnect clients based on idle time
-Run some data-intensive Servoy method server-side via a headless client (instead of running the method client-side)
Great stuff Scott!
Haven’t had the time to try it yet but looks very promising!
Just a question: would it be possible to also retrieve the Locks status? Right now this is only possible trough the admin pages but it would be really helpful…
I want to make you a question. The function client*.GetActivityTimestamp ()* * returns the timer of the check alive but this time is updated around every minute even if the user does not perform any operation.* How can I obtain the return idleTimeStamp? Thank you.
Is it possible also, to start a headless client, application-wide instead of session-wide?
I mean, preventing multiple headless-clients started by clients, so we run out of licenses, in no time?
Harjo:
Hi Scott,
Is it possible also, to start a headless client, application-wide instead of session-wide?
I mean, preventing multiple headless-clients started by clients, so we run out of licenses, in no time?
You could do this with your own logic. Check for client type on your startup method, and if headless, use the addClientInfo to add something, like the solution name, to the client info. Then also check to see if there are any other clients with that clientInfo, if so, disconnect the current client (so only one headless client at a time per application)
First I am running Servoy 3.17, Java JRE 1.5.0_b13 on a Windows XP platform with SP2. I have installed the Robot plug-in.
In the editor when I click on servoy_robot, I see checkAccessPassword, getApplicationServer, getClients, getNewHeadlessClient.
When I click on JSApplicationServer, I see hashCode, restart, shutdown. When I click on JSHeadlessClient, I see hashCode, runFormMethod, runGlobalMethod.
But when I click on JSClient, it does not highlight nor does it display any of its functions in the Outline panel as do JSApplicationServer and JSHeadlessClient.
Needless to say, I can not access the functions associated with the JSClient. What is wrong? Is there a new release on the website that addresses this issue?
I really need a means to logoff smart clients so that the Servoy licenses are freed when a user is no longer actively using the smart client.
First I am running Servoy 3.17, Java JRE 1.5.0_b13 on a Windows XP platform with SP2. I have installed the Robot plug-in.
I tried running this code on the developer machine. The server is on a different machine than the developer. The Robot plugin is installed on both machines.
The server robot plugin has a password. We are using the standard ports (http) 8080 and (RMI) 1099. The following code always outputs failed.
I tried using 8080 as the port as well as ‘192.168.1.1’ instead of the url for the host.
other versions that I tried:
var validPassword = plugins.servoyguy_robot.checkAccessPassword(‘robot_password’, ‘192.168.1.1’, ‘1099’);
var validPassword = plugins.servoyguy_robot.checkAccessPassword(‘robot_password’, ‘192.168.1.1’, ‘8080’);
var validPassword = plugins.servoyguy_robot.checkAccessPassword(‘robot_password’, ‘http://my_server_address’, ‘8080’);
Is the serverPort argument a string or a number? The function without the serverHost and serverPort arguments works fine.