com.addc.server.monitoring.MonitoredExceptionHelper 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 exception "MonitoredException".
*
* @author JacORB IDL compiler V 3.9
* @version generated at Nov 9, 2019 1:39:38 PM
*/
public abstract class MonitoredExceptionHelper
{
private volatile static org.omg.CORBA.TypeCode _type;
public static org.omg.CORBA.TypeCode type ()
{
if (_type == null)
{
synchronized(MonitoredExceptionHelper.class)
{
if (_type == null)
{
_type = org.omg.CORBA.ORB.init().create_exception_tc(com.addc.server.monitoring.MonitoredExceptionHelper.id(),"MonitoredException",new org.omg.CORBA.StructMember[]{new org.omg.CORBA.StructMember("failedComponents", org.omg.CORBA.ORB.init().create_alias_tc(com.addc.server.monitoring.CorbalocsHelper.id(), "Corbalocs",org.omg.CORBA.ORB.init().create_sequence_tc(0, org.omg.CORBA.ORB.init().create_string_tc(0))), null)});
}
}
}
return _type;
}
public static void insert (final org.omg.CORBA.Any any, final com.addc.server.monitoring.MonitoredException s)
{
any.type(type());
write( any.create_output_stream(),s);
}
public static com.addc.server.monitoring.MonitoredException extract (final org.omg.CORBA.Any any)
{
org.omg.CORBA.portable.InputStream in = any.create_input_stream();
try
{
return read (in);
}
finally
{
try
{
in.close();
}
catch (java.io.IOException e)
{
throw new RuntimeException("Unexpected exception " + e.toString() );
}
}
}
public static String id()
{
return "IDL:monitoring/MonitoredException:1.0";
}
public static com.addc.server.monitoring.MonitoredException read (final org.omg.CORBA.portable.InputStream in)
{
String id = in.read_string();
if (!id.equals(id())) throw new org.omg.CORBA.MARSHAL("wrong id: " + id);
java.lang.String[] x0;
x0 = com.addc.server.monitoring.CorbalocsHelper.read(in);
final com.addc.server.monitoring.MonitoredException result = new com.addc.server.monitoring.MonitoredException(id, x0);
return result;
}
public static void write (final org.omg.CORBA.portable.OutputStream out, final com.addc.server.monitoring.MonitoredException s)
{
out.write_string(id());
com.addc.server.monitoring.CorbalocsHelper.write(out,s.failedComponents);
}
}