throw new RemarshalException();
}
final ReplyInputStream reply = ( ReplyInputStream ) in;
final ReplyStatusType_1_2 status = reply.getStatus();
switch ( status.value() )
{
case ReplyStatusType_1_2._NO_EXCEPTION:
{
try
{
interceptors.handle_receive_reply ( reply );
}
catch (ForwardRequest fwd)
{
// should not happen with a remote request
}
checkTimeout();
return reply;
}
case ReplyStatusType_1_2._USER_EXCEPTION:
{
ApplicationException ae = getApplicationException ( reply );
try
{
interceptors.handle_receive_exception( ae, reply );
}
catch (ForwardRequest fwd)
{
// should not happen with a remote request
}
checkTimeout();
throw ae;
}
case ReplyStatusType_1_2._SYSTEM_EXCEPTION:
{
SystemException se = SystemExceptionHelper.read ( reply );
try
{
interceptors.handle_receive_exception( se, reply );
}
catch (ForwardRequest fwd)
{
// should not happen with a remote request
}
checkTimeout();
throw se;
}
case ReplyStatusType_1_2._LOCATION_FORWARD:
case ReplyStatusType_1_2._LOCATION_FORWARD_PERM:
{
org.omg.CORBA.Object forward_reference = reply.read_Object();
try
{
interceptors.handle_location_forward( reply, forward_reference );
}
catch (ForwardRequest fwd)
{
// should not happen with a remote request
}
checkTimeout();
doRebind( forward_reference );
throw new RemarshalException();
}
case ReplyStatusType_1_2._NEEDS_ADDRESSING_MODE:
{
throw new org.omg.CORBA.NO_IMPLEMENT(
"WARNING: Got reply status NEEDS_ADDRESSING_MODE "
+ "(not implemented)." );
}
default:
{
throw new MARSHAL
("Received unexpected reply status: " + status.value() );
}
}
}