• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java RequestContext类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.google.web.bindery.requestfactory.shared.RequestContext的典型用法代码示例。如果您正苦于以下问题:Java RequestContext类的具体用法?Java RequestContext怎么用?Java RequestContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



RequestContext类属于com.google.web.bindery.requestfactory.shared包,在下文中一共展示了RequestContext类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: edit

import com.google.web.bindery.requestfactory.shared.RequestContext; //导入依赖的package包/类
/**
 * Construct and display the UI that will be used to edit the current
 * PersonProxy, using the given RequestContext to accumulate the edits.
 */
private void edit(RequestContext requestContext) {
  editorDriver = GWT.create(Driver.class);
  editorDriver.initialize(requestFactory, personEditor);
  
  if (requestContext == null) {
    this.favorite.setVisible(true);
    fetchAndEdit();
    return;
  }

  editorDriver.edit(person, requestContext);
  personEditor.focus();
  favorite.setValue(manager.isFavorite(person), false);
  dialog.center();
}
 
开发者ID:Peergos,项目名称:Peergos,代码行数:20,代码来源:PersonEditorWorkflow.java


示例2: TransportEntry

import com.google.web.bindery.requestfactory.shared.RequestContext; //导入依赖的package包/类
public TransportEntry(RequestContext requestContext, Receiver recv) {
    QosRequestTransport transport = (QosRequestTransport) requestContext.getRequestFactory().getRequestTransport();
    transport.startBatch();

    transport.setNextReceiverForEntry(QosRequestTransport.CAPTURE);

    if (recv == null) {
        requestContext.fire();
    } else {
        requestContext.fire(recv);
    }

    List<BatchedRequest> b = transport.flushBatch();
    payload = b.get(0).payload;
    receiver = b.get(0).receiver;

    // close the RequestContext so can be re-used.
    try {
        receiver.onTransportFailure(new ServerFailure("GOO"));
    } catch (Throwable th) {
    }
}
 
开发者ID:salk31,项目名称:gwt-rf-queue,代码行数:23,代码来源:TransportEntry.java


示例3: append

import com.google.web.bindery.requestfactory.shared.RequestContext; //导入依赖的package包/类
@Override
public <T extends RequestContext> T append(final T other) {
  final AbstractRequestContext child = (AbstractRequestContext) other;
  if (!this.state.isCompatible(child.state)) {
    throw new IllegalStateException(
        this.getClass().getName() + " and " + child.getClass().getName() + " are not compatible");
  }
  if (!child.state.isClean()) {
    throw new IllegalStateException("The provided RequestContext has been changed");
  }
  child.setState(this.state);
  return other;
}
 
开发者ID:ManfredTremmel,项目名称:gwt-bean-validators,代码行数:14,代码来源:AbstractRequestContext.java


示例4: createServiceInstance

import com.google.web.bindery.requestfactory.shared.RequestContext; //导入依赖的package包/类
@Override
public Object createServiceInstance(Class<? extends RequestContext> requestContext) {
    Class<? extends ServiceLocator> serviceLocatorClass;
    if ((serviceLocatorClass = getTop().resolveServiceLocator(requestContext)) != null) {
        return injector.getInstance(serviceLocatorClass).getInstance(requestContext.getAnnotation(Service.class).value());
    } else {
        return null;
    }
}
 
开发者ID:dharmab,项目名称:sheets,代码行数:10,代码来源:InjectableServiceLayerDecorator.java


示例5: register

import com.google.web.bindery.requestfactory.shared.RequestContext; //导入依赖的package包/类
static void register(EventBus eventBus,
    final DynaTableRequestFactory requestFactory,
    final FavoritesManager manager) {
  eventBus.addHandler(EditPersonEvent.TYPE, new EditPersonEvent.Handler() {
    public void startEdit(PersonProxy person, RequestContext requestContext) {
      new PersonEditorWorkflow(requestFactory, manager, person).edit(requestContext);
    }
  });
}
 
开发者ID:Peergos,项目名称:Peergos,代码行数:10,代码来源:PersonEditorWorkflow.java


示例6: onSave

import com.google.web.bindery.requestfactory.shared.RequestContext; //导入依赖的package包/类
/**
 * Called by the edit dialog's save button. This method will flush the
 * contents of the UI into the PersonProxy that is being edited, check for
 * errors, and send the request to the server.
 */
@UiHandler("save")
void onSave(ClickEvent event) {
  // Flush the contents of the UI
  RequestContext context = editorDriver.flush();

  // Check for errors
  if (editorDriver.hasErrors()) {
    dialog.setText("Errors detected locally");
    return;
  }

  // Send the request
  context.fire(new Receiver<Void>() {
    @Override
    public void onConstraintViolation(Set<ConstraintViolation<?>> errors) {
      // Otherwise, show ConstraintViolations in the UI
      dialog.setText("Errors detected on the server");
      editorDriver.setConstraintViolations(errors);
    }

    @Override
    public void onSuccess(Void response) {
      // If everything went as planned, just dismiss the dialog box
      dialog.hide();
    }
  });
}
 
开发者ID:Peergos,项目名称:Peergos,代码行数:33,代码来源:PersonEditorWorkflow.java


示例7: EditPersonEvent

import com.google.web.bindery.requestfactory.shared.RequestContext; //导入依赖的package包/类
public EditPersonEvent(PersonProxy person, RequestContext request) {
  this.person = person;
  this.request = request;
}
 
开发者ID:Peergos,项目名称:Peergos,代码行数:5,代码来源:EditPersonEvent.java


示例8: getRequestContext

import com.google.web.bindery.requestfactory.shared.RequestContext; //导入依赖的package包/类
@Override
public RequestContext getRequestContext() {
    return request.getRequestContext();
}
 
开发者ID:salk31,项目名称:gwt-rf-queue,代码行数:5,代码来源:RequestAdapter.java


示例9: to

import com.google.web.bindery.requestfactory.shared.RequestContext; //导入依赖的package包/类
@Override
public RequestContext to(Receiver receiver) {
    request.to(receiver);
    return getRequestContext();
}
 
开发者ID:salk31,项目名称:gwt-rf-queue,代码行数:6,代码来源:RequestAdapter.java


示例10: RequestContextEntry

import com.google.web.bindery.requestfactory.shared.RequestContext; //导入依赖的package包/类
public RequestContextEntry(RequestContext requestContext2) {
    this(requestContext2, null);
}
 
开发者ID:salk31,项目名称:gwt-rf-queue,代码行数:4,代码来源:RequestContextEntry.java


示例11: getRequestContext

import com.google.web.bindery.requestfactory.shared.RequestContext; //导入依赖的package包/类
RequestContext getRequestContext() {
    return requestContext;
}
 
开发者ID:salk31,项目名称:gwt-rf-queue,代码行数:4,代码来源:RequestContextEntry.java


示例12: add

import com.google.web.bindery.requestfactory.shared.RequestContext; //导入依赖的package包/类
@Override
public void add(RequestContext r) {
    add(new RequestContextEntry(r));
}
 
开发者ID:salk31,项目名称:gwt-rf-queue,代码行数:5,代码来源:AbstractPipeInput.java


示例13: startEdit

import com.google.web.bindery.requestfactory.shared.RequestContext; //导入依赖的package包/类
void startEdit(PersonProxy person, RequestContext requestContext); 
开发者ID:Peergos,项目名称:Peergos,代码行数:2,代码来源:EditPersonEvent.java


示例14: add

import com.google.web.bindery.requestfactory.shared.RequestContext; //导入依赖的package包/类
void add(RequestContext r); 
开发者ID:salk31,项目名称:gwt-rf-queue,代码行数:2,代码来源:PipeInput.java



注:本文中的com.google.web.bindery.requestfactory.shared.RequestContext类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java SshException类代码示例发布时间:2022-05-22
下一篇:
Java KnowledgeBuilderFactory类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap