Archived

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

Dispatch Intercepts in Python

I was reading up on the dispatch intercept on chapter 28 and there's no explanation for how it is done in python. I began to attempt to even translate the C++ code shown into python, but there's no Ice.DispatchInterceptor type. All I'm trying to do is intercept a call before it is dispatched to the respective server call so that i can query information about where the call is coming from. Pretty similar to examining soap headers for the User Agent and Remote Address. In this case my ultimate goal is to be able to recognize the client of the user - such as whether it's a C++, .NET, Java or Python client, and see the ip address that the request is coming from. This will significantly help in regards of associating this information with a logged in user/session.

Comments

  • bernard
    bernard Jupiter, FL
    Hi Neel,

    Dispatch interceptors are currently available in C++, Java, C# and Objective-C, but not in Python.

    Maybe you could use a servant locator as a work-around.

    Best regards,
    Bernard
  • Thanks. The servant locator may not even be neccessary since i can get the information from the "current" parameter which to each operation on the server side. I get sufficient information from current.con.toString(). I'll work with that. Thanks for the suggestion of servant locators however, I think it'll even help to differentiate servant locators based on categories and designate one per each type of "user agent" so to speak. So since the applications will vary per implementation language, the servant locators should vary for each by the category. This will definitely do.