Results 1 to 4 of 4

Thread: How can I execute a method in my Module by means of a HTTProvider?

  1. #1
    Join Date
    Sep 2013
    Posts
    18

    Default How can I execute a method in my Module by means of a HTTProvider?

    How can I execute a method in my Module by means of a HTTProvider?

    I am using the examples on here : http://www.wowza.com/forums/content....post-variables

    Can I call a method on my Module by means on the appInstance variable?

  2. #2
    Join Date
    May 2013
    Posts
    680

    Default

    When you load your http provider via url (i.e. http://[your-wowza-ip]:8086/myCustomProvider), the onHTTPRequest event is fired (as long as you've defined it in your VHost.xml). Within that function, you can execute any of your functionality as needed. If you want to execute different functions based on the POST/GET params, you can add the conditionals there if needed.

    The example in that tutorial shows how to obtain an appinstance reference by which you can invoke its functionality(See full featured):

    IApplicationInstance appInstance = vhost.getApplication(app).getAppInstance("_definst_");

  3. #3
    Join Date
    May 2013
    Posts
    680

    Default

    Further you can invoke functionality from a specific module as follows:

    IApplication app = vhost.getApplication("live");
    
    MyClassDefinition myModule = (MyClassDefinition)appInstance.getModuleInstance("MyModuleByNameInApplicationXML");
    if (myModule!=null)
    {
        myModule.someFunctionInModule(any parameters);
    }

  4. #4
    Join Date
    Sep 2013
    Posts
    18

    Default

    And THIS is why I switched to WowzaMedia! Thanks Matt!

Similar Threads

  1. Replies: 1
    Last Post: 09-10-2012, 04:36 AM
  2. is it possible unix shell call a class/method on a wowza module?
    By killerwake in forum Server-side Modules and Code Samples Discussion
    Replies: 2
    Last Post: 11-20-2011, 05:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •