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


Java Request.getMethodName方法代码示例

本文整理汇总了Java中org.objectweb.proactive.core.body.request.Request.getMethodName方法的典型用法代码示例。如果您正苦于以下问题:Java Request.getMethodName方法的具体用法?Java Request.getMethodName怎么用?Java Request.getMethodName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.objectweb.proactive.core.body.request.Request的用法示例。


在下文中一共展示了Request.getMethodName方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: internalReceiveRequest

import org.objectweb.proactive.core.body.request.Request; //导入方法依赖的package包/类
/**
 * Receives a request for later processing. The call to this method is non blocking unless the
 * body cannot temporary receive the request.
 *
 * @param request the request to process
 * @throws java.io.IOException if the request cannot be accepted
 */
@Override
protected int internalReceiveRequest(Request request) throws java.io.IOException,
        RenegotiateSessionException {
    // JMX Notification
    if (!isProActiveInternalObject && (this.mbean != null)) {
        String tagNotification = createTagNotification(request.getTags());
        RequestNotificationData requestNotificationData = new RequestNotificationData(request
                .getSourceBodyID(), request.getSenderNodeURL(), this.bodyID, this.nodeURL, request
                .getMethodName(), getRequestQueue().size() + 1, request.getSequenceNumber(),
            tagNotification);
        this.mbean.sendNotification(NotificationType.requestReceived, requestNotificationData);
    }

    // END JMX Notification

    // request queue length = number of requests in queue
    // + the one to add now
    try {
        return this.requestReceiver.receiveRequest(request, this);
    } catch (CommunicationForbiddenException e) {
        e.printStackTrace();
    }

    return 0;
}
 
开发者ID:mnip91,项目名称:proactive-component-monitoring,代码行数:33,代码来源:BodyImpl.java

示例2: acceptRequest

import org.objectweb.proactive.core.body.request.Request; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
public boolean acceptRequest(final Request request) {
    // We find all the requests which can't be served yet
    String name = request.getMethodName();
    if (name.equals("waitAny")) {
        return false;
    } else if (name.equals("waitAll")) {
        return false;
    }
    return true;
}
 
开发者ID:ow2-proactive,项目名称:connector-matlab-scilab,代码行数:14,代码来源:AOMatSciEnvironment.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: acceptRequest

import org.objectweb.proactive.core.body.request.Request; //导入方法依赖的package包/类
/** {@inheritDoc} */
public boolean acceptRequest(final Request request) {
    // We find all the requests that are not servable yet
    String name = request.getMethodName();
    return !name.equals("secondTerminate") && !name.equals("awaitsTermination") &&
        !name.equals("secondTerminate") && !name.equals("finalTerminate");
}
 
开发者ID:mnip91,项目名称:proactive-component-monitoring,代码行数:8,代码来源:AOMaster.java

示例5: serve

import org.objectweb.proactive.core.body.request.Request; //导入方法依赖的package包/类
public void serve(Request request) {
    throw new InactiveBodyException(BodyImpl.this, (request != null) ? request.getMethodName()
            : "null request");
}
 
开发者ID:mnip91,项目名称:proactive-component-monitoring,代码行数:5,代码来源:BodyImpl.java

示例6: serveWithException

import org.objectweb.proactive.core.body.request.Request; //导入方法依赖的package包/类
@Override
public void serveWithException(Request request, Throwable exception) {
    throw new InactiveBodyException(BodyImpl.this, (request != null) ? request.getMethodName()
            : "null request");
}
 
开发者ID:mnip91,项目名称:proactive-component-monitoring,代码行数:6,代码来源:BodyImpl.java

示例7: receiveRequest

import org.objectweb.proactive.core.body.request.Request; //导入方法依赖的package包/类
public int receiveRequest(Request request) throws java.io.IOException, RenegotiateSessionException {
    // System.out.println("" + this + " --> receiveRequest m="+request.getMethodName());
    // NON_FT is returned if this object is not fault tolerant
    int ftres = FTManager.NON_FT;
    if (this.ftmanager != null) {
        if (this.isDead) {
            throw new BodyTerminatedRequestException(shortString(), request != null ? request
                    .getMethodName() : null);
        } else {
            ftres = this.ftmanager.onReceiveRequest(request);
            if (request.ignoreIt()) {
                return ftres;
            }
        }
    }
    try {
        this.enterInThreadStore();
        if (this.isDead) {
            throw new BodyTerminatedRequestException(shortString(), request != null ? request
                    .getMethodName() : null);
        }
        if (this.isSecurityOn) {

            /*
             * if (isInterfaceSecureImplemented) { Session session =
             * psm.getSession(request.getSessionId()); ((Secure)
             * getReifiedObject()).receiveRequest(session.getSecurityContext()); }
             */
            try {
                this.renegociateSessionIfNeeded(request.getSessionId());
                if ((this.internalBodySecurity.isLocalBody()) && request.isCiphered()) {
                    request.decrypt(this.securityManager);
                }
            } catch (SecurityNotAvailableException e) {
                // do nothing
                e.printStackTrace();
            }
        }
        this.registerIncomingFutures();
        ftres = this.internalReceiveRequest(request);
        if (GarbageCollector.dgcIsEnabled()) {
            updateReferences(UniversalBodyProxy.getIncomingReferences());
        }
    } finally {
        this.exitFromThreadStore();
    }
    return ftres;
}
 
开发者ID:mnip91,项目名称:proactive-component-monitoring,代码行数:49,代码来源:AbstractBody.java


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