com.addc.server.monitoring.MonitoredPOA 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 "Monitored".
*
* @author JacORB IDL compiler V 3.9
* @version generated at Mar 25, 2019 1:59:31 PM
*/
public abstract class MonitoredPOA
extends org.omg.PortableServer.Servant
implements org.omg.CORBA.portable.InvokeHandler, com.addc.server.monitoring.MonitoredOperations
{
static private final java.util.HashMap m_opsHash = new java.util.HashMap();
static
{
m_opsHash.put ( "_get_monitoredComponents", Integer.valueOf(0));
m_opsHash.put ( "ping", Integer.valueOf(1));
}
private String[] ids = {"IDL:monitoring/Monitored:1.0"};
public com.addc.server.monitoring.Monitored _this()
{
org.omg.CORBA.Object __o = _this_object() ;
com.addc.server.monitoring.Monitored __r = com.addc.server.monitoring.MonitoredHelper.narrow(__o);
return __r;
}
public com.addc.server.monitoring.Monitored _this(org.omg.CORBA.ORB orb)
{
org.omg.CORBA.Object __o = _this_object(orb) ;
com.addc.server.monitoring.Monitored __r = com.addc.server.monitoring.MonitoredHelper.narrow(__o);
return __r;
}
public org.omg.CORBA.portable.OutputStream _invoke(String method, org.omg.CORBA.portable.InputStream _input, org.omg.CORBA.portable.ResponseHandler handler)
throws org.omg.CORBA.SystemException
{
org.omg.CORBA.portable.OutputStream _out = null;
// do something
// quick lookup of operation
java.lang.Integer opsIndex = (java.lang.Integer)m_opsHash.get ( method );
if ( null == opsIndex )
throw new org.omg.CORBA.BAD_OPERATION(method + " not found");
switch ( opsIndex.intValue() )
{
case 0: // _get_monitoredComponents
{
_out = handler.createReply();
com.addc.server.monitoring.CorbalocsHelper.write(_out,monitoredComponents());
break;
}
case 1: // ping
{
try
{
_out = handler.createReply();
ping();
}
catch(com.addc.server.monitoring.MonitoredException _ex0)
{
_out = handler.createExceptionReply();
com.addc.server.monitoring.MonitoredExceptionHelper.write(_out, _ex0);
}
break;
}
}
return _out;
}
public String[] _all_interfaces(org.omg.PortableServer.POA poa, byte[] obj_id)
{
return ids;
}
}