I have a question regarding SimTask usage. The docs are not exactly clear about the circumstances under which a "new" simtask is created, but I am under the assumption that the current SimTask is created when the server fires an event.
Assuming a hypothetical Player implementing SimUserDataListener..
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| public void userDataReceived(UserID arg0, ByteBuffer arg1) { SimTask simTask = SimTask.getCurrent(); doThing1(simTask); doThing2(); }
private void doThing1(SimTask task) { ... }
private void doThing2() { SimTask simTask = SimTask.getCurrent(); } |
Are the simTask refrences in doThing1 and doThing2 the same? My feeling is yes, but I wanted to make sure. Additionally I was hoping I wouldn't have to be passing SimTask references everywhere

For what it is worth, I am thinking of the SimTask conceptually as a container managed transaction. Is that a relatively appropriate model?