|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Application
This is where a Moho application starts. A Moho application must have one implementation class of Application.
The Application implementation class must be a public class with a public default constructor. This class is responsible for
init and
destroy methodsSignalEvent. See
Observer for information about the
method signature requirements.For example:
public MyMohoApplication implements Application {
public MyMohoApplication() {
// construction
}
public init(ApplicationContext context} {
// get application parameters
// initialize application
}
public void myInviteHandler(InviteEvent invitation) {
Call call = invitation.accept();
}
public destroy() {
// uninitialize application
}
}
Any event handling method will be called by multiple threads concurrently. It is the implementation's responsibility to manage the concurrency issue in event handling methods.
| Method Summary | |
|---|---|
void |
destroy()
Invoked by Moho Framework to uninitialize the application |
void |
init(ApplicationContext ctx)
Invoked by Moho Framework to initialize the application with an application context |
| Method Detail |
|---|
void init(ApplicationContext ctx)
ctx - application contextvoid destroy()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||