org.omg.CosTransactions.TerminatorPOA Maven / Gradle / Ivy
The newest version!
package org.omg.CosTransactions;
/**
* Generated from IDL interface "Terminator".
*
* @author JacORB IDL compiler V 2.3.1 (JBoss patch01), 29-Jul-2009
* @version generated at Oct 2, 2012 3:07:46 PM
*/
public abstract class TerminatorPOA
extends org.omg.PortableServer.Servant
implements org.omg.CORBA.portable.InvokeHandler, org.omg.CosTransactions.TerminatorOperations
{
static private final java.util.Hashtable m_opsHash = new java.util.Hashtable();
static
{
m_opsHash.put ( "rollback", new java.lang.Integer(0));
m_opsHash.put ( "commit", new java.lang.Integer(1));
}
private String[] ids = {"IDL:omg.org/CosTransactions/Terminator:1.0"};
public org.omg.CosTransactions.Terminator _this()
{
return org.omg.CosTransactions.TerminatorHelper.narrow(_this_object());
}
public org.omg.CosTransactions.Terminator _this(org.omg.CORBA.ORB orb)
{
return org.omg.CosTransactions.TerminatorHelper.narrow(_this_object(orb));
}
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: // rollback
{
_out = handler.createReply();
rollback();
break;
}
case 1: // commit
{
try
{
boolean _arg0=_input.read_boolean();
_out = handler.createReply();
commit(_arg0);
}
catch(org.omg.CosTransactions.HeuristicHazard _ex0)
{
_out = handler.createExceptionReply();
org.omg.CosTransactions.HeuristicHazardHelper.write(_out, _ex0);
}
catch(org.omg.CosTransactions.HeuristicMixed _ex1)
{
_out = handler.createExceptionReply();
org.omg.CosTransactions.HeuristicMixedHelper.write(_out, _ex1);
}
break;
}
}
return _out;
}
public String[] _all_interfaces(org.omg.PortableServer.POA poa, byte[] obj_id)
{
return ids;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy