org.restlet.Request.setOnResponse()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(169)

本文整理了Java中org.restlet.Request.setOnResponse方法的一些代码示例,展示了Request.setOnResponse的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.setOnResponse方法的具体详情如下:
包路径:org.restlet.Request
类名称:Request
方法名:setOnResponse

Request.setOnResponse介绍

[英]Sets the callback invoked on response reception. If the value is not null, then the associated request will be executed asynchronously.
[中]设置接收响应时调用的回调。如果该值不为null,则关联的请求将异步执行。

代码示例

代码示例来源:origin: org.restlet.osgi/org.restlet

@Override
public void setOnResponse(Uniform onResponseCallback) {
  wrappedRequest.setOnResponse(onResponseCallback);
}

代码示例来源:origin: org.restlet.osgi/org.restlet

/**
 * Sets the callback invoked on response reception. If the value is not
 * null, then the associated request will be executed asynchronously.
 * 
 * @param onResponseCallback
 *            The callback invoked on response reception.
 */
public void setOnResponse(Uniform onResponseCallback) {
  getRequest().setOnResponse(onResponseCallback);
}

代码示例来源:origin: org.restlet.osgi/org.restlet

/**
 * Handles a call.
 * 
 * @param request
 *            The request to handle.
 * @param response
 *            The response to update.
 * @param onResponseCallback
 *            The callback invoked upon response reception.
 */
public final void handle(Request request, Response response,
    Uniform onResponseCallback) {
  request.setOnResponse(onResponseCallback);
  handle(request, response);
}

代码示例来源:origin: org.restlet.jse/org.restlet.example

request.setOnResponse(new Uniform() {
  public void handle(Request req, Response resp) {
    SipResponse r = (SipResponse) resp;

相关文章