本文整理汇总了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;
}
示例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;
}
示例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: 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");
}
示例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");
}
示例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");
}
示例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;
}