And now it has created a new class called Application which extends MultithreadedApplicationAdapter in the com.testapp package. (notice if you expand Java Resources: src folder in the project explorer, and then expand com.testapp package, you will see the Application.java class) You can override any of the functions in MultithreadedApplicationAdapter, but you don't have to. Any function you put inside this Application class, will be accessible to your client app. So if you put an "add" function like below:
public int add(int a, int b)
{
return a+b;
}
Then you can call it from your client app, with code like this:
nc.call("add", responseHandler, 2, 3);
Expand the www folder in your project, then expand the WEB-INF folder, and open red5-web.xml, find the web.handler bean, and make sure that the class= is set to the right path of your class that extends ApplicationAdapter.
For example, if your class that extends ApplicationAdapter is called Application and it is in the com.testapp directory, then the web.handler bean's class should be set to com.testapp.Application. Like so:
If you open red5-web.properties inside www/WEB-INF, you will see the contextPath is equal to testapp (by convention it will be the same as the project name). This is the name used by the client app to connect in the rtmp path (for example rtmp://localhost/testapp).
NOTE: if you open web.xml and logback-testapp.xml, you will also see testapp within them... all these things need to match so it's best to leave it alone.
TIP: if you open the xml files, and they are in Design mode, click on the Source tab at the bottom of the file and it will be easier to modify and work with.
[endtext]