Results 1 to 2 of 2

Thread: ModuleBase class, onStreamCreate and onStreamDestroy Methods

  1. #1

    Question ModuleBase class, onStreamCreate and onStreamDestroy Methods


    I am trying to understand how the Loop Until Live module ( works, and have several questions. Here's the first one, and I'm sure there will be many to follow!

    I can see that the class extends ModuleBase. I have looked up the ModuleBase class in the documentation and this does not have a onStreamCreate or onStreamDestroy method, so where do these actually get called from?

    I see in the documentation there is a IModuleOnStream interface, and this specifies these methods, but this interface is not implemented by the class.

    I have pasted the module code here for reference:


  2. #2



    The best place to start is probably the Extending Wowza Streaming Engine Using Java chapter in the User Guide. It gives a fairly high level description of the basic module structure.

    When module are loaded for an application, they are parsed and any methods that match known method signatures are registered and event handlers. Later, when the methods need to be called, java reflection is used to call the methods.

    The Interfaces in the com.wowza.wms.module package are just there for convenience to list each of the methods. You don't need to implement the interfaces to use the methods. ModuleBase just contains some static convenience methods that are used with modules. You don't strictly have to extend ModuleBase if you don't want to however, you wouldn't have access to these convenience methods.

    ModuleCore is the main top level module that is required for an application to have basic functionality. It should be the first module in the list. You can override any of the methods in ModuleCore and you should use the invokePrevious(client, function, params); method (from ModuleBase) to call the ModuleCore method.

    I hope this helps.


Similar Threads

  1. ModuleBase methods invoke error
    By pirateMan in forum General Forum
    Replies: 4
    Last Post: 01-20-2015, 07:47 AM
  2. InvocationTargetException in attempt invoke methods onConnect,onStreamCreate in modul
    By headshrinker in forum Wowza Streaming Server Java API
    Replies: 1
    Last Post: 09-26-2014, 02:01 AM
  3. onStreamDestroy not being called
    By masterkitano in forum General Forum
    Replies: 1
    Last Post: 06-29-2013, 01:15 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