Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.omg.CosBridgeAdmin;


Generated from IDL interface "BridgeFactory".

Author(s):
JacORB IDL compiler V 3.5
Version:
generated at 11-Jul-2014 12:35:23
  
 
 public class _BridgeFactoryStub
 {
Serial version UID.
 
 	private static final long serialVersionUID = 1L;
 	private String[] ids = {"IDL:omg.org/CosBridgeAdmin/BridgeFactory:1.0"};
 	public String[] _ids()
 	{
 		return ;
 	}
 
 	public final static java.lang.Class _opsClass = org.omg.CosBridgeAdmin.BridgeFactoryOperations.class;
 	{
 		while(true)
 		{
 			if(! this._is_local())
 			{
 				org.omg.CORBA.portable.InputStream _is = null;
 				org.omg.CORBA.portable.OutputStream _os = null;
 				try
 				{
 					_os = _request"create_bridge"true);
 					org.omg.CosBridgeAdmin.ExternalEndpointHelper.write(_os,source);
 					org.omg.CosBridgeAdmin.ExternalEndpointHelper.write(_os,sink);
 					_is = _invoke(_os);
 					org.omg.CosBridgeAdmin.Bridge _result = org.omg.CosBridgeAdmin.BridgeHelper.read(_is);
 					id.value = _is.read_long();
 					return _result;
 				}
 					{
 						continue;
 					}
 				{
 					String _id = _ax.getId();
 					try
 					{
 						if_id.equals("IDL:omg.org/CosBridgeAdmin/InvalidExternalEndPoints:1.0"))
 						{
 							throw org.omg.CosBridgeAdmin.InvalidExternalEndPointsHelper.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_bridge" );
 			if_so == null )
 				continue;
 			BridgeFactoryOperations _localServant = (BridgeFactoryOperations)_so.servant;
 			try
 			{
 				_result = _localServant.create_bridge(source,sink,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
			{
			}
		}
		}
	}
	{
		while(true)
		{
			if(! this._is_local())
			{
				try
				{
					_os = _request"get_bridge_with_id"true);
					_os.write_long(id);
					_is = _invoke(_os);
					org.omg.CosBridgeAdmin.Bridge _result = org.omg.CosBridgeAdmin.BridgeHelper.read(_is);
					return _result;
				}
					{
						continue;
					}
				{
					String _id = _ax.getId();
					try
					{
						if_id.equals("IDL:omg.org/CosBridgeAdmin/BridgeNotFound:1.0"))
						{
							throw org.omg.CosBridgeAdmin.BridgeNotFoundHelper.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_bridge_with_id" );
			if_so == null )
				continue;
			BridgeFactoryOperations _localServant = (BridgeFactoryOperations)_so.servant;
			try
			{
				_result = _localServant.get_bridge_with_id(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_bridges()
	{
		while(true)
		{
			if(! this._is_local())
			{
				try
				{
					_os = _request"get_all_bridges"true);
					_is = _invoke(_os);
					int[] _result = org.omg.CosBridgeAdmin.BridgeIDSeqHelper.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_bridges" );
			if_so == null )
				continue;
			BridgeFactoryOperations _localServant = (BridgeFactoryOperations)_so.servant;
			int[] _result;
			try
			{
				_result = _localServant.get_all_bridges();
				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