Home Help Center

Starting servers with IceGrid::Admin

borax00borax00 Member Alex BrooksOrganization: Marathon RoboticsProject: www.marathon-robotics.com ✭✭
Hi,

I'm using Ice v3.2, and trying to start/stop servers using the IceGrid::Admin interface.

IceGrid::Admin provides two functions: startServer() and stopServer().
If I call startServer() for a server that is already started, it raises a ServerStartException. From the description of ServerStartException, it looks like this is a general-purpose exception that could be called for a number of reasons.

So my question is, is there a way to find out whether or not a server is already started? If I don't know the current state, I have no way of reliably putting it into the 'Started' state. I notice that an isEnabled() function is provided, but not isStarted().

I can see that one way to do it would be to register a NodeObserver, and look at the state of the servers through the nodeInit() function. But this seems pretty cumbersome -- am I missing something?




Thanks,

Alex

Comments

  • michimichi Member Michi HenningOrganization: Triodia TechnologiesProject: I have a passing interest in Ice :-) ✭✭✭
    You can call getServerState to get the current state of a server.

    Cheers,

    Michi.
  • borax00borax00 Member Alex BrooksOrganization: Marathon RoboticsProject: www.marathon-robotics.com ✭✭
    Bugger, it was right there in front of me -- sorry to bother.
Sign In or Register to comment.