Archived

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

AMI or not AMI depending on slice args?

Hi, all.

is it possible to declare slice so that same declaration will be suitable for AMI or for direct invocation depending on slice command flags?

We have a service and two clients.

One client should use AMI, and other should call same methods synchronously. We'd like to have same slice interface definition file for two clients. Is it possible?

Comments

  • mes
    mes California
    Hi,

    When you add the "ami" metadata to a Slice operation, it causes the Slice compiler to generate an asynchronous version of the proxy method in addition to the synchronous version. Clients can use whichever style is appropriate.

    Note however that the same is not true in a servant when you specify the "amd" metadata. In this case, the asynchronous servant method replaces the synchronous version.

    Take care,
    Mark
  • Thank you, I mixed up "ami" and "amd".