Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.omg.CosCollection;


Generated from IDL interface "PriorityQueue".

Author(s):
JacORB IDL compiler V 3.5
Version:
generated at 11-Jul-2014 12:35:16
  
 
 public class _PriorityQueueStub
 {
Serial version UID.
 
 	private static final long serialVersionUID = 1L;
 	private String[] ids = {"IDL:omg.org/CosCollection/PriorityQueue:1.0","IDL:omg.org/CosCollection/RestrictedAccessCollection:1.0"};
 	public String[] _ids()
 	{
 		return ;
 	}
 
 	public final static java.lang.Class _opsClass = org.omg.CosCollection.PriorityQueueOperations.class;
 	public void purge()
 	{
 		while(true)
 		{
 			if(! this._is_local())
 			{
 				org.omg.CORBA.portable.InputStream _is = null;
 				org.omg.CORBA.portable.OutputStream _os = null;
 				try
 				{
 					_os = _request"purge"true);
 					_is = _invoke(_os);
 					return;
 				}
 					{
 						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
 		{
 			if_so == null )
 				continue;
 			PriorityQueueOperations _localServant = (PriorityQueueOperations)_so.servant;
 			try
 			{
 				_localServant.purge();
 				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
 				return;
 			}
 			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 boolean unfilled()
	{
		while(true)
		{
			if(! this._is_local())
			{
				try
				{
					_os = _request"unfilled"true);
					_is = _invoke(_os);
					boolean _result = _is.read_boolean();
					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
		{
			if_so == null )
				continue;
			PriorityQueueOperations _localServant = (PriorityQueueOperations)_so.servant;
			boolean _result;
			try
			{
				_result = _localServant.unfilled();
				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
			{
			}
		}
		}
	}
	public int size()
	{
		while(true)
		{
			if(! this._is_local())
			{
				try
				{
					_os = _request"size"true);
					_is = _invoke(_os);
					int _result = _is.read_ulong();
					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
		{
			if_so == null )
				continue;
			PriorityQueueOperations _localServant = (PriorityQueueOperations)_so.servant;
			int _result;
			try
			{
				_result = _localServant.size();
				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
			{
			}
		}
		}
	}
	{
		while(true)
		{
			if(! this._is_local())
			{
				try
				{
					_os = _request"element_dequeue"true);
					_is = _invoke(_os);
					boolean _result = _is.read_boolean();
					element.value = _is.read_any();
					return _result;
				}
					{
						continue;
					}
				{
					String _id = _ax.getId();
					try
					{
						if_id.equals("IDL:omg.org/CosCollection/EmptyCollection:1.0"))
						{
							throw org.omg.CosCollection.EmptyCollectionHelper.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"element_dequeue" );
			if_so == null )
				continue;
			PriorityQueueOperations _localServant = (PriorityQueueOperations)_so.servant;
			boolean _result;
			try
			{
				_result = _localServant.element_dequeue(element);
				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 void dequeue() throws org.omg.CosCollection.EmptyCollection
	{
		while(true)
		{
			if(! this._is_local())
			{
				try
				{
					_os = _request"dequeue"true);
					_is = _invoke(_os);
					return;
				}
					{
						continue;
					}
				{
					String _id = _ax.getId();
					try
					{
						if_id.equals("IDL:omg.org/CosCollection/EmptyCollection:1.0"))
						{
							throw org.omg.CosCollection.EmptyCollectionHelper.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
		{
			if_so == null )
				continue;
			PriorityQueueOperations _localServant = (PriorityQueueOperations)_so.servant;
			try
			{
				_localServant.dequeue();
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				return;
			}
			{
				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 void enqueue(org.omg.CORBA.Any elementthrows org.omg.CosCollection.ElementInvalid
	{
		while(true)
		{
			if(! this._is_local())
			{
				try
				{
					_os = _request"enqueue"true);
					_os.write_any(element);
					_is = _invoke(_os);
					return;
				}
					{
						continue;
					}
				{
					String _id = _ax.getId();
					try
					{
						if_id.equals("IDL:omg.org/CosCollection/ElementInvalid:1.0"))
						{
							throw org.omg.CosCollection.ElementInvalidHelper.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
		{
			if_so == null )
				continue;
			PriorityQueueOperations _localServant = (PriorityQueueOperations)_so.servant;
			try
			{
				_localServant.enqueue(element);
				if ( _so instanceof org.omg.CORBA.portable.ServantObjectExt
				return;
			}
			{
				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
			{
			}
		}
		}
	}
New to GrepCode? Check out our FAQ X