Results 1 to 4 of 4

Thread: sendClientOnStatusError with only IClient

  1. #1
    Join Date
    Jun 2011
    Posts
    8

    Default sendClientOnStatusError with only IClient

    Hello,

    I need to send sendClientOnStatusError to the client.

    I don't have an access to ModuleBase object in this piece of code, but I have the actual IClient I need to send a status to.

    This is possible to send a custom status error to the client outside ModuleBase and without sendClientOnStatusError?

    Thanks,
    Max

  2. #2
    Join Date
    Sep 2011
    Posts
    1,933

    Default

    Hi,
    You can do it, if you have the IClient you can send a AMF object which matches the client status you want to send, no idea how to build the correct AMF object but this is possible.

    Jason

  3. #3
    Join Date
    Jun 2011
    Posts
    8

    Default

    Any hints where I can search for it?

  4. #4

    Default

    Quote Originally Posted by mexxik View Post
    Hello,

    I need to send sendClientOnStatusError to the client.

    I don't have an access to ModuleBase object in this piece of code, but I have the actual IClient I need to send a status to.

    This is possible to send a custom status error to the client outside ModuleBase and without sendClientOnStatusError?

    Thanks,
    Max
    Hi,

    ModuleBase is just a collection of static convenience methods. You are not limited to extending ModuleBase from just modules. You can extend it from any class and then access its methods.

    Because the methods are protected methods, you do need to extend ModuleBase to use them but that is the only limitation.

    If you cannot extend it (because you are already extending another class), you can use an internal wrapper class to wrap the methods you want to use.

    import com.wowza.wms.client.IClient;
    import com.wowza.wms.module.ModuleBase;
    
    public class MyNonModuleClass {
    
    	static class ModuleBaseWrapper extends ModuleBase
    	{
    		protected static void sendClientOnStatusError(IClient client, String code, String description)
    		{
    			ModuleBase.sendClientOnStatusError(client, code, description);
    		}
    	}
    	
    	public void doSomething(IClient client)
    	{
    		String code = "code";
    		String description = "description";
    		ModuleBaseWrapper.sendClientOnStatusError(client, code, description);
    	}
    }
    Roger.

Similar Threads

  1. sendClientOnStatusError from Thread
    By KoWa90 in forum Wowza Streaming Server Java API
    Replies: 1
    Last Post: 03-14-2014, 07:54 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
  •