本文整理了Java中org.restlet.Request.setOnResponse
方法的一些代码示例,展示了Request.setOnResponse
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.setOnResponse
方法的具体详情如下:
包路径:org.restlet.Request
类名称: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;
内容来源于网络,如有侵权,请联系作者删除!