Writing a netlet
public class MyNetlet implements MobileCode, Callback, ....., Serializable {
private MobileCodeStub stub = null; // Defined here but set by the MCM !
// Implement all methods of the MobileCode interface
public setStub (MobileCodeStub stub) { // Nobody but MCM should call this !
// If you want your netlet to run, implement the Callback methods
// Implement all methods of all other interfaces implemented
Notes:
1) Every netlet must implement MobileCode, at the least.
ie. Every netlet must implement all methods of MobileCode, notably setStub ()
2) To satisfy 1), every netlet must define a private stub;
3) If you want your netlet to run (ie. be active, not passive), you must implement Callback
NOTE : In particular, you must implement onInit () and onStart ().
4) Implementation of any interface method follows the same format as aMethod().
5) Avoid all this hassle by using SuperNetlet : Simply override onInit () and onStart () !
6) To migrate, must implement Serializable (Maybe this should be added to SuperNetlet).