本文整理汇总了Java中org.objectweb.proactive.core.body.request.Request.getMethodCall方法的典型用法代码示例。如果您正苦于以下问题:Java Request.getMethodCall方法的具体用法?Java Request.getMethodCall怎么用?Java Request.getMethodCall使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.objectweb.proactive.core.body.request.Request
的用法示例。
在下文中一共展示了Request.getMethodCall方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: serve
import org.objectweb.proactive.core.body.request.Request; //导入方法依赖的package包/类
/**
* Serves the request. The request should be removed from the request queue before serving,
* which is correctly done by all methods of the Service class. However, this condition is not
* ensured for custom calls on serve.
*/
public void serve(Request request) {
// Sterility control
// If the methodCall is sterile, the body must be sterile during its service
if (request != null && request.getMethodCall() != null && request.getMethodCall().isSterile()) {
setSterility(true, request.getSender().getID());
}
// Serve
if (this.ftmanager != null) {
this.ftmanager.onServeRequestBefore(request);
this.localBodyStrategy.serve(request);
this.ftmanager.onServeRequestAfter(request);
} else {
this.localBodyStrategy.serve(request);
}
// Sterility control
// Once the service of a sterile methodCall is done, the body can be turned back to standard
// mode
this.setSterility(false, null);
}
示例2: serveWithException
import org.objectweb.proactive.core.body.request.Request; //导入方法依赖的package包/类
/**
* Serves the request with the given exception as result instead of the normal execution.
* The request should be removed from the request queue before serving,
* which is correctly done by all methods of the Service class. However, this condition is
* not ensured for custom calls on serve.
*/
public void serveWithException(Request request, Throwable exception) {
// Sterility control
// If the methodCall is sterile, the body must be sterile during its service
if (request != null && request.getMethodCall() != null && request.getMethodCall().isSterile()) {
setSterility(true, request.getSender().getID());
}
// Serve
if (this.ftmanager != null) {
this.ftmanager.onServeRequestBefore(request);
this.localBodyStrategy.serveWithException(request, exception);
this.ftmanager.onServeRequestAfter(request);
} else {
this.localBodyStrategy.serveWithException(request, exception);
}
// Sterility control
// Once the service of a sterile methodCall is done, the body can be turned back to standard
// mode
this.setSterility(false, null);
}
示例3: RequestInfo
import org.objectweb.proactive.core.body.request.Request; //导入方法依赖的package包/类
public RequestInfo(Request r) {
// Sender
if (r.getSender() != null) {
senderID = r.getSender().getID().getCanonString();
} else {
senderID = "no sender";
}
sequenceNumber = r.getSequenceNumber();
// MethodCalled
if (r.getMethodName() != null) {
methodCalled = r.getMethodName();
} else {
methodCalled = "not methodName";
}
if (r.getMethodCall() != null) {
int sizeOfParams = r.getMethodCall().getNumberOfParameter();
for (int i = 0; i < sizeOfParams; i++) {
parameters.add(r.getParameter(i).getClass().getSimpleName());
}
}
if (r.getMethodCall().getReifiedMethod() != null) {
returnType = r.getMethodCall().getReifiedMethod().getReturnType().getSimpleName();
} else {
returnType = "no reifiedMethod";
}
}
示例4: ThrowExceptionRequest
import org.objectweb.proactive.core.body.request.Request; //导入方法依赖的package包/类
public ThrowExceptionRequest(Request request, RuntimeException exception) {
super(request.getMethodCall(), request.getSender(), request.isOneWay(), request.getSequenceNumber());
this.exception = exception;
}
示例5: ComponentRequestImpl
import org.objectweb.proactive.core.body.request.Request; //导入方法依赖的package包/类
public ComponentRequestImpl(Request request) {
super(request.getMethodCall(), request.getSender(), request.isOneWay(), request.getSequenceNumber());
declaringClass = methodCall.getReifiedMethod().getDeclaringClass();
}