VServer class interface

Frank Schima frank-list at mindstarprods.com
Tue May 6 13:54:02 CDT 2003


Hi Igor,


On Tuesday, May 6, 2003, at 01:26  PM, Igor Gomon wrote:
> We'd like to know your opinion about VServer class interface that we 
> plan to include
> in the client SDK.

It looks good!

> So, this is the details:
>
> To construct VServer object you must do the following:
> mServer = new VServer( host, user, password )

Can we also have an optional Port? Or is that part of the host (e.g. 
myhost:1234)?

> //Properties
> str = VServer.Version;    // Returns the version of currently running 
> VServer instance
> long = VServer.ActiveConnectionCount;  // Returns the number of active 
> connections
> bool = VServer.Available;   // Test server for availability

It would be nice to have read-only Properties for host, user and maybe 
port.

> //Administrative methods
> VServer.Restart(); // Restarts VServer; can be used to apply 
> configuration changes
> VServer.Shutdown(Type as Integer); // as Type can be specified: 0 - 
> wait for all connections closing
>          // or 1 shutdown immediately
>
> // User methods
> VServer.AddUser(UserName as String, Password as String);
> VServer.RemoveUser(UserName as String);
> VServer.ChangeUserPassword(UserName as String, OldPassword as String, 
> NewPassword as String);

Shouldn't these all return a Boolean to know if they were successful? 
For instance, what if a non-admin tries to add a user or shutdown the 
server.

For the Shutdown(0) Method, maybe a Shutdown Event could be fired so we 
know when the server has actually shut down.


Best regards,
Frank

---
Frank Schima                <mailto:frank-list at mindstarprods.com>
Independent Consultant
Gaithersburg, MD USA        <http://www.ci.gaithersburg.md.us/>



More information about the Valentina mailing list