01: package org.romaframework.aspect.view.echo2.push;
02:
03: import nextapp.echo2.app.TaskQueueHandle;
04:
05: import org.romaframework.aspect.session.SessionInfo;
06: import org.romaframework.aspect.view.echo2.Echo2ApplicationContext;
07: import org.romaframework.aspect.view.form.ContentComponent;
08:
09: public abstract class PushTask implements Runnable {
10:
11: protected ContentComponent form;
12: protected SessionInfo session;
13:
14: public PushTask(SessionInfo session, ContentComponent form) {
15: this .session = session;
16: this .form = form;
17:
18: Echo2ApplicationContext appInstance = (Echo2ApplicationContext) session
19: .getId();
20: TaskQueueHandle handle = appInstance.createTaskQueue();
21: appInstance.enqueueTask(handle, this);
22: }
23: }
|