RTI Connext CORBA Compatibility Kit  Version 6.0.1
 All Groups Pages
_MessageReceiverStub.java

[$(NDDSHOME)/example/JAVA/corba/_MessageReceiverStub.java]

public class _MessageReceiverStub
extends org.omg.CORBA.portable.ObjectImpl
implements MessageReceiver
{
private static final long serialVersionUID = 1L;
private String[] ids = {"IDL:MessageReceiver:1.0"};
public String[] _ids()
{
return ids;
}
public final static java.lang.Class _opsClass = MessageReceiverOperations.class;
public void sendMessage(Message msg)
{
while(true)
{
if(! this._is_local())
{
org.omg.CORBA.portable.InputStream _is = null;
org.omg.CORBA.portable.OutputStream _os = null;
try
{
_os = _request( "sendMessage", true);
MessageHelper.write(_os,msg);
_is = _invoke(_os);
return;
}
catch( org.omg.CORBA.portable.RemarshalException _rx )
{
continue;
}
catch( org.omg.CORBA.portable.ApplicationException _ax )
{
String _id = _ax.getId();
try
{
_ax.getInputStream().close();
}
catch (java.io.IOException e)
{
throw new RuntimeException("Unexpected exception " + e.toString() );
}
throw new RuntimeException("Unexpected exception " + _id );
}
finally
{
if (_os != null)
{
try
{
_os.close();
}
catch (java.io.IOException e)
{
throw new RuntimeException("Unexpected exception " + e.toString() );
}
}
this._releaseReply(_is);
}
}
else
{
org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "sendMessage", _opsClass );
if( _so == null )
continue;
MessageReceiverOperations _localServant = (MessageReceiverOperations)_so.servant;
try
{
_localServant.sendMessage(msg);
if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt)
((org.omg.CORBA.portable.ServantObjectExt)_so).normalCompletion();
return;
}
catch (RuntimeException re)
{
if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt)
((org.omg.CORBA.portable.ServantObjectExt)_so).exceptionalCompletion(re);
throw re;
}
catch (java.lang.Error err)
{
if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt)
((org.omg.CORBA.portable.ServantObjectExt)_so).exceptionalCompletion(err);
throw err;
}
finally
{
_servant_postinvoke(_so);
}
}
}
}
}

RTI Connext CORBA Compatibility Kit Version 6.0.1 Copyright © Sun Nov 17 2019 Real-Time Innovations, Inc