Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.omg.CosConcurrencyControl;


Generated from IDL interface "TransactionalLockSet".

Author(s):
JacORB IDL compiler V 3.5
Version:
generated at 11-Jul-2014 12:35:15
  
 
 public abstract class TransactionalLockSetPOA
 {
 	static private final java.util.HashMap<String,Integerm_opsHash = new java.util.HashMap<String,Integer>();
 	static
 	{
 		.put ( "try_lock", Integer.valueOf(0));
 		.put ( "get_coordinator", Integer.valueOf(1));
 		.put ( "change_mode", Integer.valueOf(2));
 		.put ( "lock", Integer.valueOf(3));
 		.put ( "unlock", Integer.valueOf(4));
 	}
 	private String[] ids = {"IDL:omg.org/CosConcurrencyControl/TransactionalLockSet:1.0"};
 	{
 		org.omg.CORBA.Object __o = _this_object() ;
 		org.omg.CosConcurrencyControl.TransactionalLockSet __r = org.omg.CosConcurrencyControl.TransactionalLockSetHelper.narrow(__o);
 		return __r;
 	}
 	{
 		org.omg.CORBA.Object __o = _this_object(orb) ;
 		org.omg.CosConcurrencyControl.TransactionalLockSet __r = org.omg.CosConcurrencyControl.TransactionalLockSetHelper.narrow(__o);
 		return __r;
 	}
 	{
 		org.omg.CORBA.portable.OutputStream _out = null;
 		// do something
 		// quick lookup of operation
 		java.lang.Integer opsIndex = (java.lang.Integer).get ( method );
 		if ( null == opsIndex )
 			throw new org.omg.CORBA.BAD_OPERATION(method + " not found");
 		switch ( opsIndex.intValue() )
 		{
 			case 0: // try_lock
 			{
 				org.omg.CosTransactions.Coordinator _arg0=org.omg.CosTransactions.CoordinatorHelper.read(_input);
 				org.omg.CosConcurrencyControl.lock_mode _arg1=org.omg.CosConcurrencyControl.lock_modeHelper.read(_input);
 				_out = handler.createReply();
 				_out.write_boolean(try_lock(_arg0,_arg1));
 				break;
 			}
 			case 1: // get_coordinator
 			{
 				org.omg.CosTransactions.Coordinator _arg0=org.omg.CosTransactions.CoordinatorHelper.read(_input);
 				_out = handler.createReply();
 				org.omg.CosConcurrencyControl.LockCoordinatorHelper.write(_out,get_coordinator(_arg0));
 				break;
 			}
 			case 2: // change_mode
 			{
 			try
 			{
 				org.omg.CosTransactions.Coordinator _arg0=org.omg.CosTransactions.CoordinatorHelper.read(_input);
 				org.omg.CosConcurrencyControl.lock_mode _arg1=org.omg.CosConcurrencyControl.lock_modeHelper.read(_input);
 				org.omg.CosConcurrencyControl.lock_mode _arg2=org.omg.CosConcurrencyControl.lock_modeHelper.read(_input);
 				_out = handler.createReply();
 				change_mode(_arg0,_arg1,_arg2);
 			}
 			{
 				_out = handler.createExceptionReply();
 				org.omg.CosConcurrencyControl.LockNotHeldHelper.write(_out_ex0);
 			}
 				break;
 			}
 			case 3: // lock
 			{
 				org.omg.CosTransactions.Coordinator _arg0=org.omg.CosTransactions.CoordinatorHelper.read(_input);
 				org.omg.CosConcurrencyControl.lock_mode _arg1=org.omg.CosConcurrencyControl.lock_modeHelper.read(_input);
 				_out = handler.createReply();
 				lock(_arg0,_arg1);
 				break;
 			}
 			case 4: // unlock
 			{
 			try
 			{
 				org.omg.CosTransactions.Coordinator _arg0=org.omg.CosTransactions.CoordinatorHelper.read(_input);
 				org.omg.CosConcurrencyControl.lock_mode _arg1=org.omg.CosConcurrencyControl.lock_modeHelper.read(_input);
 				_out = handler.createReply();
 				unlock(_arg0,_arg1);
 			}
 			{
 				_out = handler.createExceptionReply();
				org.omg.CosConcurrencyControl.LockNotHeldHelper.write(_out_ex0);
			}
				break;
			}
		}
		return _out;
	}
	public String[] _all_interfaces(org.omg.PortableServer.POA poabyte[] obj_id)
	{
		return ;
	}
New to GrepCode? Check out our FAQ X