本文整理汇总了Java中com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage.getReplyStatus方法的典型用法代码示例。如果您正苦于以下问题:Java ReplyMessage.getReplyStatus方法的具体用法?Java ReplyMessage.getReplyStatus怎么用?Java ReplyMessage.getReplyStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage
的用法示例。
在下文中一共展示了ReplyMessage.getReplyStatus方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: invokeServerPIEndingPoint
import com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage; //导入方法依赖的package包/类
public void invokeServerPIEndingPoint( ReplyMessage replyMessage )
{
if( !hasServerInterceptors ) return;
ServerRequestInfoImpl info = peekServerRequestInfoImplStack();
// REVISIT: This needs to be done "early" for the following workaround.
info.setReplyMessage( replyMessage );
// REVISIT: This was done inside of invokeServerInterceptorEndingPoint
// but needs to be here for now. See comment in that method for why.
info.setCurrentExecutionPoint( info.EXECUTION_POINT_ENDING );
// It is possible we might have entered this method more than
// once (e.g. if an ending point threw a SystemException, then
// a new ServerResponseImpl is created).
if( !info.getAlreadyExecuted() ) {
int replyStatus = replyMessage.getReplyStatus();
// Translate ReplyMessage.replyStatus into PI replyStatus:
// Note: this is also an assertion to make sure a valid
// replyStatus is passed in (IndexOutOfBoundsException will be
// thrown otherwise)
short piReplyStatus =
REPLY_MESSAGE_TO_PI_REPLY_STATUS[replyStatus];
// Make forwarded IOR available to interceptors, if applicable:
if( ( piReplyStatus == LOCATION_FORWARD.value ) ||
( piReplyStatus == TRANSPORT_RETRY.value ) )
{
info.setForwardRequest( replyMessage.getIOR() );
}
// REVISIT: Do early above for now.
// Make reply message available to interceptors:
//info.setReplyMessage( replyMessage );
// Remember exception so we can tell if an interceptor changed it.
Exception prevException = info.getException();
// _REVISIT_ We do not have access to the User Exception at
// this point, so treat it as an UNKNOWN for now.
// Note that if this is a DSI call, we do have the user exception.
if( !info.isDynamic() &&
(piReplyStatus == USER_EXCEPTION.value) )
{
info.setException( omgWrapper.unknownUserException(
CompletionStatus.COMPLETED_MAYBE ) ) ;
}
// Invoke the ending interception points:
info.setReplyStatus( piReplyStatus );
interceptorInvoker.invokeServerInterceptorEndingPoint( info );
short newPIReplyStatus = info.getReplyStatus();
Exception newException = info.getException();
// Check reply status. If an interceptor threw a SystemException
// and it is different than the one that we came in with,
// rethrow it so the proper response can be constructed:
if( ( newPIReplyStatus == SYSTEM_EXCEPTION.value ) &&
( newException != prevException ) )
{
throw (SystemException)newException;
}
// If we are to forward the location:
if( newPIReplyStatus == LOCATION_FORWARD.value ) {
if( piReplyStatus != LOCATION_FORWARD.value ) {
// Treat a ForwardRequest as a ForwardException.
IOR ior = info.getForwardRequestIOR();
throw new ForwardException( orb, ior ) ;
}
else if( info.isForwardRequestRaisedInEnding() ) {
// Treat a ForwardRequest by changing the IOR.
replyMessage.setIOR( info.getForwardRequestIOR() );
}
}
}
}