当前位置: 首页>>代码示例>>Java>>正文


Java Request.getMethodCall方法代码示例

本文整理汇总了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);
}
 
开发者ID:mnip91,项目名称:proactive-component-monitoring,代码行数:27,代码来源:AbstractBody.java

示例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);
}
 
开发者ID:mnip91,项目名称:proactive-component-monitoring,代码行数:28,代码来源:AbstractBody.java

示例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";
    }
}
 
开发者ID:mnip91,项目名称:proactive-component-monitoring,代码行数:28,代码来源:RequestInfo.java

示例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;
}
 
开发者ID:ow2-proactive,项目名称:scheduling,代码行数:5,代码来源:ThrowExceptionRequest.java

示例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();
}
 
开发者ID:mnip91,项目名称:proactive-component-monitoring,代码行数:5,代码来源:ComponentRequestImpl.java


注:本文中的org.objectweb.proactive.core.body.request.Request.getMethodCall方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。