Click here to Skip to main content
15,892,072 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm playing with a proto-type for a Java server. For various reasons there is a constraint that it runs under Standard Edition, so no J2EE jiggery pockery or third party add ins.

There is a client app, that basically renders the UI and communicates with the server over TCP/IP; all that is not a problem. The server runs various services; doesn't matter what they are, it just provides the functional facade to the client.

No where I want some proding is in thinking aloud how to control the server. I do not want any GUI [yet] as it will probably be running on a *nix box. My idea is to have a command line interface. This would mean, I think, that the user enters a command and that then connects to the server and pokes it in. The command line interface needs to be able to start and stop services or the entire server and enquire on the status of the system.

I thought about using a TCP/IP connection between the two processes, but is that the best way? Any hints on the best way to join the two processes would be much appreciated.

You give me the idea and I'll write the code.

No offers? Not even at Christmas?
Vilmos sad. :(
Posted
Updated 23-Dec-11 0:49am
v2
Comments
Arndt Faulhaber 12-Jan-12 5:26am    
Why not write a simple RMI-client, which simply calls some remote methods (like shutdown() ) depending on its cmd-line params?
Nagy Vilmos 12-Jan-12 5:35am    
I'm trying to avoid too much dependencies beyond J2SE.
Arndt Faulhaber 12-Jan-12 8:00am    
RMI should be part of J2SE (see http://www.oracle.com/technetwork/java/javase/tech/index-jsp-136424.html)

-a

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900