PPT Slide
tcpListener
mcc = ctp.receive (..)
... Reads code from socket
... Add code to queue
Instantiator
addElement (mcc) {
queue.add (mcc)
run () {
resume ();
}
for (;;) {
suspend;
mcc = queue.get (mcc)
verify mcc
Put mcc in storageManager
Instantiate the mcc
StorageManager
mcHandler
putContainer ()
MobileCodeRunner
extends Thread
run () {
mcm.instantiate (mcc)
MobileCodeManager
vmcInstances
mcInstances
instantiate () {
getContainer ()
Get mcc from storageManager
Load mcc’s classes
If it’s a VMC
vmcInstances.add ()
Else it’s a MobileCode
mcInstances.add ()
set mcc’s state = RUNNING
call mcc’s onInit ()
call mcc’s onStart ()
}
}
queue
spawns
queues mcc
MobileCodeContainer
creates
puts mcc
gets mcc
runs mcc
Code arrives
1
2
3
4
5
6
7
onInit () onStart ()
8
9
}
}
What happens when Mobile Code
Arrives at the MCD?
Previous slide
Next slide
Back to first slide
View graphic version