Xlet's lifecycle can be easily visualized from the four callback methods' definitions.
LOADED
This state actually is not related with any of four callbacks. This state can be assumed when the default constructor invoked and the Xlet instance has been created.
PAUSED
This state can be reached by one of following paths.
- The host middleware invoked initXlet() on the LOADED Xlet instance.
- The host middleware invoked pauseXlet() on the ACTIVE Xlet instance.
- The Xlet instance (which is ACTIVE) makes itself PAUSED and notifies manager via XletContext.notifyPaused().
ACTIVE
The host middleware invoked startXlet() on the PAUSED Xlet instance.
DESTROYED
This state is the last state every Xlet instances go.
- The host middleware invoked destroyXlet() on the Xlet instance.
- The Xlet instance (which is not DESTROYED yet) makes itself DESTROYED and notifies manager via XletContext.notifyDestroyed().
One of funky points is that the destroyXlet() method can be invoked from any other states.
Here comes what apidoc saids.
This method may be called from the Loaded, Paused or Active states.[TODO] jinahya.fsm.xlet link

