Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Add an HTTPProvider programatically?

  1. Default Add an HTTPProvider programatically?

    Is it possible to add an HTTPProvider via API? I'm trying:

    MyHttprovider p = new MyHttprovider();
    p.setRequestFilters("*foo");
    p.setAuthenticationMethod("none");
    vhost.getHostPortsList().get(0).addHttpProvider(p);

    where MyHttprovider is a class that extends HTTProvider2Base

    ... but that doesn't seem to do the job... I still get the default httpprovider on http://wowza-ip/foo .

    Is this not possible, or am I just doing something wrong here?

    Thanks,
    Jay

  2. #2
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    Jay,

    I don't think that will work, or that there is a way to do that. I don't see any IVHost.add* or other methods that might be a basis for doing that.

    Richard

  3. #3

    Default

    If you are adding a HTTPProvider then they are adding on the end, so if you have a default catch all, ie. serverinfo, then adding a HTTPProvider on the end wont allow it to be matched.

    You need to remove the catch all on VHost entry so you can add yours end. Unlike HTTPProviders, HTTProvider2Base can not be removed once added and you can not change the filters set up, so you need to alter your VHost then restart Wowza.

    Andrew.

  4. Default

    Thanks Andrew

    I'm pretty sure I tried that after my previous post and had no success, but I will try again tomorrow and post my results here.

  5. Default

    Seems I must have done something wrong in my previous test run. Removing the catch all from vhost.xml and starting my own IHTTPProvider is working as expected.

    Thanks again!

  6. Default

    Seems there's something else I'm missing. While my HTTPProvider works, it only seems to respond on port 1935 (where others will respond on all of the ports configured for the VHost.

    Is there something else I need to do to get my HTTPProvider to work with all ports?

  7. #7
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    An HTTPProvider has to be in the HTTProviders list of the /HostPort you want it to work with. If one is working with port 8086 and port 1935 (like HTTPServerVersion) then it is in both HostPorts.

    Richard

  8. Default

    Thanks Richard.


    The HostPort I'm working with has ports 80,1935, and 1111 in the <port> node. Do I somehow need to iterate through those ports when adding my HTTPProvider?
    Last edited by jay_charles; 01-21-2013 at 09:29 AM.

  9. #9
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    Yes, if you want it to work with other ports that are defined in other HostPorts.

    Richard

  10. Default

    The ports aren't defined in other hostports. All of the ports I want the HTTPProvider available to are defined in the same hostport.

Page 1 of 2 12 LastLast

Similar Threads

  1. Create Publisher Programatically
    By balasubramanianp in forum General Forum
    Replies: 1
    Last Post: 06-20-2014, 05:07 AM
  2. Add live stream or VOD programatically
    By dnyanesh.gate in forum Wowza Streaming Server Java API
    Replies: 1
    Last Post: 06-20-2014, 05:03 AM

Posting Permissions

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