com.addc.server.monitoring._MonitorStub Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of addc-svr-monitor Show documentation
Show all versions of addc-svr-monitor Show documentation
Supplies the classes required for monitoring a server with the Amentet Monitoring Service
package com.addc.server.monitoring;
/**
* Generated from IDL interface "Monitor".
*
* @author JacORB IDL compiler V 3.9
* @version generated at Nov 9, 2019 1:39:38 PM
*/
public class _MonitorStub
extends org.omg.CORBA.portable.ObjectImpl
implements com.addc.server.monitoring.Monitor
{
/** Serial version UID. */
private static final long serialVersionUID = 1L;
private String[] ids = {"IDL:monitoring/Monitor:1.0"};
public String[] _ids()
{
return ids;
}
public final static java.lang.Class _opsClass = com.addc.server.monitoring.MonitorOperations.class;
public void componentStops(java.lang.String corbaloc)
{
while(true)
{
if(! this._is_local())
{
org.omg.CORBA.portable.InputStream _is = null;
org.omg.CORBA.portable.OutputStream _os = null;
try
{
_os = _request( "componentStops", true);
java.lang.String tmpResult1 = corbaloc;
_os.write_string( tmpResult1 );
_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( "componentStops", _opsClass );
if( _so == null )
continue;
MonitorOperations _localServant = (MonitorOperations)_so.servant;
try
{
_localServant.componentStops(corbaloc);
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);
}
}
}
}
public void componentRefresh(java.lang.String corbaloc)
{
while(true)
{
if(! this._is_local())
{
org.omg.CORBA.portable.InputStream _is = null;
org.omg.CORBA.portable.OutputStream _os = null;
try
{
_os = _request( "componentRefresh", true);
java.lang.String tmpResult2 = corbaloc;
_os.write_string( tmpResult2 );
_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( "componentRefresh", _opsClass );
if( _so == null )
continue;
MonitorOperations _localServant = (MonitorOperations)_so.servant;
try
{
_localServant.componentRefresh(corbaloc);
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);
}
}
}
}
public void componentStarts(java.lang.String corbaloc, int leaseTime)
{
while(true)
{
if(! this._is_local())
{
org.omg.CORBA.portable.InputStream _is = null;
org.omg.CORBA.portable.OutputStream _os = null;
try
{
_os = _request( "componentStarts", true);
java.lang.String tmpResult3 = corbaloc;
_os.write_string( tmpResult3 );
_os.write_long(leaseTime);
_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( "componentStarts", _opsClass );
if( _so == null )
continue;
MonitorOperations _localServant = (MonitorOperations)_so.servant;
try
{
_localServant.componentStarts(corbaloc,leaseTime);
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);
}
}
}
}
public java.lang.String[] listMonitoredComponents()
{
while(true)
{
if(! this._is_local())
{
org.omg.CORBA.portable.InputStream _is = null;
org.omg.CORBA.portable.OutputStream _os = null;
try
{
_os = _request( "listMonitoredComponents", true);
_is = _invoke(_os);
java.lang.String[] _result = com.addc.server.monitoring.CorbalocsHelper.read(_is);
return _result;
}
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( "listMonitoredComponents", _opsClass );
if( _so == null )
continue;
MonitorOperations _localServant = (MonitorOperations)_so.servant;
java.lang.String[] _result;
try
{
_result = _localServant.listMonitoredComponents();
if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt)
((org.omg.CORBA.portable.ServantObjectExt)_so).normalCompletion();
return _result;
}
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);
}
}
}
}
}