How can I remove an Endpoint from an Adapter?and...?

xiehuaxiehua ✭✭Member ✭✭
How can I remove an Endpoint from an Adapter?And how can I remove an Adapter form an communication and destroy it?

when I bind an Endpoint to an Adapter,The Adater keep listening to the port.
I have no idea of how to stop this listening,or remove the Endpoint form it;
even if I deactivate the Adapter,it still keep the port in his listening.And also I have no idea of how to remove the Adapter form the communication and destroy it --stop it from listening to the port so I can make it use by the other adapter.

thanks for help me to know how to do it in Ice. If there is no way.I strongly
comment adding these function in the later release of ICE.
:)

Comments

  • marcmarc ZeroC Staff FloridaAdministrators, ZeroC Staff Marc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications Engine ZeroC Staff
    When you deactivate an object adapter, it will stop listening to new connection requests. You can easily confirm this by using network tracing with Ice.Trace.Network=2. The procedure is to first call deactivate() and then waitForDeactivate(). This is all explained in chapter 30.3.5 of our Ice manual.

    You cannot remove endpoints from an object adapter. You can only deactivate the object adapter completely, with all its endpoints.
  • xiehuaxiehua ✭✭ Member ✭✭
    thank you,marc
    It stop listening to the port.I made a mistake.
    But I still can't remove the unuse Adapter form the commnunicotor's hash table ?
  • marcmarc ZeroC Staff FloridaAdministrators, ZeroC Staff Marc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications Engine ZeroC Staff
    This is correct, you cannot remove an object adpater. You could, however, create a new communicator with new object adpaters, and destroy the old communicator with all its object adapters.

    Why do you want to remove an object adapter in the first place? This is rather unusual. Normally, you create an OA once, and keep it for as long as your server runs.
Sign In or Register to comment.