Package name.pehl.karaka.client.dispatch

Source Code of name.pehl.karaka.client.dispatch.DispatchRequestRestletImpl

package name.pehl.karaka.client.dispatch;

import org.fusesource.restygwt.client.Method;

import com.google.gwt.http.client.Request;
import com.gwtplatform.dispatch.shared.DispatchRequest;

/**
* Implementation of {@link DispatchRequest} used by {@link KarakaActionHandler}
*
* @author $Author:$
* @version $Date:$ $Revision:$
*/
public class DispatchRequestRestletImpl implements DispatchRequest
{
    private final Method method;


    public DispatchRequestRestletImpl(final Method method)
    {
        this.method = method;
    }


    @Override
    public void cancel()
    {
        Request request = method.getRequest();
        if (request != null)
        {
            request.cancel();
        }
    }


    @Override
    public boolean isPending()
    {
        return method.getResponse() == null;
    }
}
TOP

Related Classes of name.pehl.karaka.client.dispatch.DispatchRequestRestletImpl

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.