Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.omg.CosNotifyChannelAdmin;


Generated from IDL interface "EventChannelFactory".

Author(s):
JacORB IDL compiler V 3.5
Version:
generated at 11-Jul-2014 12:35:20
  
 
 {
Serial version UID.
 
 	private static final long serialVersionUID = 1L;
 	private String[] ids = {"IDL:omg.org/CosNotifyChannelAdmin/EventChannelFactory:1.0"};
 	public String[] _ids()
 	{
 		return ;
 	}
 
 	{
 		while(true)
 		{
 			if(! this._is_local())
 			{
 				org.omg.CORBA.portable.InputStream _is = null;
 				org.omg.CORBA.portable.OutputStream _os = null;
 				try
 				{
 					_os = _request"create_channel"true);
 					org.omg.CosNotification.PropertySeqHelper.write(_os,initial_qos);
 					org.omg.CosNotification.PropertySeqHelper.write(_os,initial_admin);
 					_is = _invoke(_os);
 					org.omg.CosNotifyChannelAdmin.EventChannel _result = org.omg.CosNotifyChannelAdmin.EventChannelHelper.read(_is);
 					id.value = _is.read_long();
 					return _result;
 				}
 					{
 						continue;
 					}
 				{
 					String _id = _ax.getId();
 					try
 					{
 						if_id.equals("IDL:omg.org/CosNotification/UnsupportedAdmin:1.0"))
 						{
 							throw org.omg.CosNotification.UnsupportedAdminHelper.read(_ax.getInputStream());
 						}
 						else 
 						if_id.equals("IDL:omg.org/CosNotification/UnsupportedQoS:1.0"))
 						{
 							throw org.omg.CosNotification.UnsupportedQoSHelper.read(_ax.getInputStream());
 						}
 						else 
 						{
 							throw new RuntimeException("Unexpected exception " + _id );
 						}
 					}
 					finally
 					{
 						try
 						{
 						}
 						catch (java.io.IOException e)
 						{
 							throw new RuntimeException("Unexpected exception " + e.toString() );
 						}
 					}
 			}
 			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"create_channel" );
 			if_so == null )
 				continue;
			try
			{
				_result = _localServant.create_channel(initial_qos,initial_admin,id);
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				return _result;
			}
			{
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				throw ex;
			}
			{
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				throw ex;
			}
			catch (RuntimeException re
			{
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				throw re;
			}
			catch (java.lang.Error err
			{
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				throw err;
			}
			finally
			{
			}
		}
		}
	}
	{
		while(true)
		{
			if(! this._is_local())
			{
				try
				{
					_os = _request"get_event_channel"true);
					_os.write_long(id);
					_is = _invoke(_os);
					org.omg.CosNotifyChannelAdmin.EventChannel _result = org.omg.CosNotifyChannelAdmin.EventChannelHelper.read(_is);
					return _result;
				}
					{
						continue;
					}
				{
					String _id = _ax.getId();
					try
					{
						if_id.equals("IDL:omg.org/CosNotifyChannelAdmin/ChannelNotFound:1.0"))
						{
							throw org.omg.CosNotifyChannelAdmin.ChannelNotFoundHelper.read(_ax.getInputStream());
						}
						else 
						{
							throw new RuntimeException("Unexpected exception " + _id );
						}
					}
					finally
					{
						try
						{
						}
						catch (java.io.IOException e)
						{
							throw new RuntimeException("Unexpected exception " + e.toString() );
						}
					}
			}
			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"get_event_channel" );
			if_so == null )
				continue;
			try
			{
				_result = _localServant.get_event_channel(id);
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				return _result;
			}
			{
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				throw ex;
			}
			catch (RuntimeException re
			{
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				throw re;
			}
			catch (java.lang.Error err
			{
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				throw err;
			}
			finally
			{
			}
		}
		}
	}
	public int[] get_all_channels()
	{
		while(true)
		{
			if(! this._is_local())
			{
				try
				{
					_os = _request"get_all_channels"true);
					_is = _invoke(_os);
					int[] _result = org.omg.CosNotifyChannelAdmin.ChannelIDSeqHelper.read(_is);
					return _result;
				}
					{
						continue;
					}
				{
					String _id = _ax.getId();
					try
					{
					}
					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"get_all_channels" );
			if_so == null )
				continue;
			int[] _result;
			try
			{
				_result = _localServant.get_all_channels();
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				return _result;
			}
			catch (RuntimeException re
			{
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				throw re;
			}
			catch (java.lang.Error err
			{
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				throw err;
			}
			finally
			{
			}
		}
		}
	}
New to GrepCode? Check out our FAQ X