All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.talk2object.plum.interaction.session.SessionContext Maven / Gradle / Ivy

There is a newer version: 0.1.22
Show newest version
package com.talk2object.plum.interaction.session;

import java.util.concurrent.Future;
import java.util.concurrent.FutureTask;

import com.talk2object.common.Context;
import com.talk2object.common.ContextImpl;
import com.talk2object.plum.view._abstract.components.containers.window.Window;

/**
 * session context should be independent to concrete implementations.
 * 
 * session contains main view, model.
 * 
 * @author jack
 * 
 */
public class SessionContext extends ContextImpl {
	private static final String SESSION_MODEL = "model";

	// abstract view
	private static final String SESSION_VIEW = "view";
	
	private Future refreshViewTask; 

	public SessionContext(Context parent) {
		super(parent);
	}

	public Object getModel() {
		return (Object) get(SESSION_MODEL);
	}

	public void setModel(Object model) {
		set(SESSION_MODEL, model);
	}

	public Window getView() {
		return (Window) get(SESSION_VIEW);
	}

	public void setView(Window view) {
		set(SESSION_VIEW, view);

	}

}