ZeroC

Archived

This forum has been archived. Please start a new discussion on GitHub.

remote administration

LingZheng
LingZheng
i need to get the state of the server through the network with Java
for example,in the picture,the state of the "DemoGlacier2" is Active, I need to get the state from another computer
i tried one day,but i can not find the way to resove this,can anybody provide a demo to me, thanks

Attachment not found.
ice1.jpg 165.2K

Comments

  • xdm
    xdm La Coruña, Spain
    You must create an IceGrid Administrative Session then you can retrieve the state using the IceGrid::Admin interface.
  • LingZheng
    LingZheng
    thank you very much, I got it [USER="149"]xdm[/USER]
    and I want to know how to get the adapter runtime status,can you give me one way,thanks
  • benoit
    benoit Rennes, France
    Hi,

    You can retrieve the adapter information with the IceGrid::Admin::getAdapterInfo call. The proxy attribute of the IceGrid::AdapterInfo structure will be non-null if the object adapter is accessible, null otherwise.

    Cheers,
    Benoit.
  • LingZheng
    LingZheng
    thanks [USER="34"]benoit[/USER]
    but i can not find the state of the adapter in the AdapterInfo array,does it means this adapter has no state information?
    Attachment not found.
  • benoit
    benoit Rennes, France
    Hi,

    There's no state attribute, it's the value of the proxy that indicates whether or not the adapter is accessible or not. The proxy will be null when the adapter is deactivated and non-null when the adapter is activated.

    Cheers,
    Benoit.
  • LingZheng
    LingZheng
    thanks [USER="34"]benoit[/USER] ,best wishes :D:D:D