/* * Copyright (c) 2003,2009 Declarative Engineering LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Declarative Engineering LLC * verson 1 which accompanies this distribution, and is available at * http://declarativeengineering.com/legal/DE_Developer_License_v1.txt */ package com.foundation.tcv.swt.client; import org.eclipse.swt.widgets.Shell; import com.common.debug.*; import com.foundation.tcv.view.*; /** * Maintains request information. */ class Request implements Runnable { private AbstractComponent component; private ViewMessage viewMessage; private Object returnValue = null; private boolean synchronous = false; /** * Request constructor. */ Request(AbstractComponent component, ViewMessage viewMessage, boolean synchronous) { this.component = component; this.viewMessage = viewMessage; this.synchronous = synchronous; }//Request()// /** * Runs the request (should only be called by the event thread). */ public void run() { Shell shell = component != null ? component.getShell() : null; if(shell != null) { //shellSwtUtilities.setRedraw(, false); shell.setLayoutDeferred(true); }//if// try { returnValue = component.processRequest(component, viewMessage, synchronous); }//try// catch(Throwable e) { Debug.log("Failed to complete the processing of a remote client swt view request.", e); }//catch// finally { if(shell != null) { //shellSwtUtilities.setRedraw(, true); shell.setLayoutDeferred(false); }//if// }//finally// }//run()// /** * Gets the request's result. * @return The return value for the request (only valid if synchronous). */ public Object getReturnValue() { return returnValue; }//getReturnValue()// }//Request//