Imported Classpath 0.18.

* sources.am, Makefile.in: Updated.
	* Makefile.am (nat_source_files): Removed natProxy.cc.
	* java/lang/reflect/natProxy.cc: Removed.
	* gnu/classpath/jdwp/VMFrame.java,
	gnu/classpath/jdwp/VMIdManager.java,
	gnu/classpath/jdwp/VMVirtualMachine.java,
	java/lang/reflect/VMProxy.java: New files.

2005-09-23  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* scripts/makemake.tcl (verbose): Add gnu/java/awt/peer/qt to BC
	list.

2005-09-23  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* gnu/java/net/DefaultContentHandlerFactory.java (getContent):
	Remove ClasspathToolkit references.

2005-09-23  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* gnu/awt/xlib/XCanvasPeer.java: Add new peer methods.
	* gnu/awt/xlib/XFramePeer.java: Likewise.
	* gnu/awt/xlib/XGraphicsConfiguration.java: Likewise.

2005-09-23  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* Makefile.am (libgcjawt_la_SOURCES): Remove jawt.c.  Add
	classpath/native/jawt/jawt.c.
	* Makefile.in: Regenerate.
	* jawt.c: Remove file.
	* include/Makefile.am (tool_include__HEADERS): Remove jawt.h and
	jawt_md.h.  Add ../classpath/include/jawt.h and
	../classpath/include/jawt_md.h.
	* include/Makefile.in: Regenerate.
	* include/jawt.h: Regenerate.
	* include/jawt_md.h: Regenerate.

From-SVN: r104586
This commit is contained in:
Tom Tromey
2005-09-23 21:31:04 +00:00
parent 9b044d1951
commit 1ea63ef8be
544 changed files with 34724 additions and 14512 deletions
+9 -3
View File
@@ -51,7 +51,7 @@ import org.omg.CORBA.portable.IDLEntity;
public abstract class Any
implements Serializable, IDLEntity
{
/**
/**
* Using v 1.4 serialVersionUID for interoperability.
*/
private static final long serialVersionUID = 1217179597823814463L;
@@ -312,12 +312,18 @@ public abstract class Any
public abstract void insert_TypeCode(TypeCode typecode);
/**
* Insert the CORBA <code>Value</code> into this <code>Any</code>
* Insert the CORBA <code>Value</code> into this <code>Any</code>.
*
* The type of the Any should be set (by {@link #type(TypeCode)})
* before inserting the value.
*/
public abstract void insert_Value(Serializable x, TypeCode typecode);
/**
* Insert the CORBA <code>Value</code> into this <code>Any</code>
* Insert the CORBA <code>Value</code> into this <code>Any</code>.
*
* The type of the Any should be set (by {@link #type(TypeCode)})
* before inserting the value.
*/
public abstract void insert_Value(Serializable x);
@@ -1,39 +1,40 @@
/* Invalid.java --
Copyright (C) 2005 Free Software Foundation, Inc.
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package org.omg.CORBA.DynAnyPackage;
@@ -1,39 +1,39 @@
/* InvalidSeq.java --
Copyright (C) 2005 Free Software Foundation, Inc.
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package org.omg.CORBA.DynAnyPackage;
@@ -1,39 +1,39 @@
/* InvalidValue.java --
Copyright (C) 2005 Free Software Foundation, Inc.
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package org.omg.CORBA.DynAnyPackage;
@@ -1,39 +1,39 @@
/* TypeMismatch.java --
Copyright (C) 2005 Free Software Foundation, Inc.
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package org.omg.CORBA.DynAnyPackage;
+154 -55
View File
@@ -39,10 +39,10 @@ exception statement from your version. */
package org.omg.CORBA;
import gnu.CORBA.Restricted_ORB;
import gnu.CORBA.primitiveTypeCode;
import gnu.CORBA.fixedTypeCode;
import gnu.CORBA.generalTypeCode;
import gnu.CORBA.gnuContext;
import gnu.CORBA.primitiveTypeCode;
import gnu.CORBA.recordTypeCode;
import gnu.CORBA.recursiveTypeCode;
@@ -118,13 +118,14 @@ public abstract class ORB
/**
* The class, implementing the default fully functional ORB.
*/
private static final String DEFAULT_FUNCTIONAL_ORB = "gnu.CORBA.Functional_ORB";
private static final String DEFAULT_FUNCTIONAL_ORB =
gnu.CORBA.Poa.ORB_1_4.class.getName();
/**
* The class, implementing the default restricted ORB.
*/
private static final String DEFAULT_RESTRICTED_ORB = "gnu.CORBA.Restricted_ORB";
private static final String DEFAULT_RESTRICTED_ORB =
gnu.CORBA.Restricted_ORB.class.getName();
/**
* Connect the given CORBA object to this ORB. After the object is
@@ -162,7 +163,6 @@ public abstract class ORB
throw new NO_IMPLEMENT();
}
/**
* Create alias typecode for the given typecode.
*/
@@ -204,10 +204,11 @@ public abstract class ORB
* @throws NO_IMPLEMENT, always.
*/
public DynAny create_basic_dyn_any(org.omg.CORBA.TypeCode t)
throws InconsistentTypeCode
throws InconsistentTypeCode
{
throw new NO_IMPLEMENT();
};
}
;
/**
* The support for {@link DynAny} and derived interfaces
@@ -222,7 +223,8 @@ public abstract class ORB
public DynAny create_dyn_any(org.omg.CORBA.Any a)
{
throw new NO_IMPLEMENT();
};
}
;
/**
* The support for {@link DynArray}
@@ -235,10 +237,11 @@ public abstract class ORB
* @throws NO_IMPLEMENT, always.
*/
public DynArray create_dyn_array(org.omg.CORBA.TypeCode t)
throws InconsistentTypeCode
{
throw new NO_IMPLEMENT();
};
throws InconsistentTypeCode
{
throw new NO_IMPLEMENT();
}
;
/**
* The support for {@link DynEnum}
@@ -251,10 +254,11 @@ public abstract class ORB
* @throws NO_IMPLEMENT, always.
*/
public DynEnum create_dyn_enum(org.omg.CORBA.TypeCode t)
throws InconsistentTypeCode
throws InconsistentTypeCode
{
throw new NO_IMPLEMENT();
};
}
;
/**
* The support for {@link DynSequence}
@@ -267,10 +271,11 @@ public abstract class ORB
* @throws NO_IMPLEMENT, always.
*/
public DynSequence create_dyn_sequence(org.omg.CORBA.TypeCode t)
throws InconsistentTypeCode
throws InconsistentTypeCode
{
throw new NO_IMPLEMENT();
};
}
;
/**
* The support for {@link DynStruct} and derived interfaces
@@ -283,10 +288,11 @@ public abstract class ORB
* @throws NO_IMPLEMENT, always.
*/
public DynStruct create_dyn_struct(org.omg.CORBA.TypeCode t)
throws InconsistentTypeCode
throws InconsistentTypeCode
{
throw new NO_IMPLEMENT();
};
}
;
/**
* The support for {@link DynUnion} and derived interfaces
@@ -299,10 +305,11 @@ public abstract class ORB
* @throws NO_IMPLEMENT, always.
*/
public DynUnion create_dyn_union(org.omg.CORBA.TypeCode t)
throws InconsistentTypeCode
throws InconsistentTypeCode
{
throw new NO_IMPLEMENT();
};
}
;
/**
* Create a typecode, defining the given enumeration.
@@ -442,8 +449,7 @@ public abstract class ORB
* particular transaction.
*/
public abstract Request get_next_response()
throws WrongTransaction;
throws WrongTransaction;
/**
* Create a new CDR output stream, where the parameter values can be written
@@ -473,16 +479,26 @@ public abstract class ORB
}
/**
* This should create the new policy with the specified type and initial
* state. The policies and methods for getting them are not implemented till
* v1.4 inclusive.
* <p>Creates the new policy of the specified type, having the given value.
* This method looks for the policy factory that was previously registered
* during ORB initialization by
* {@link org.omg.PortableInterceptor.ORBInitialiser}.
*
* If the suitable factory is found, this factory creates the requested policy,
* otherwise the PolicyError is thrown.
* </p><p>
* The POA policies should be created by POA, not by this method.
* </p>
* @param type the policy type.
* @param value the policy value.
* @param value the policy value, wrapped into Any.
*
* @return never
* @throws PolicyError if the ORB fails to instantiate the policy object.
*
* @throws NO_IMPLEMENT, always.
* @throws NO_IMPLEMENT always (in this class). Overridden in derived classes
* returned by ORB.init(..).
*
* @see org.omg.PortableInterceptor.ORBInitInfoOperations#register_policy_factory
* @see org.omg.PortableInterceptor.PolicyFactoryOperations
*/
public Policy create_policy(int type, Any value)
throws PolicyError
@@ -490,8 +506,6 @@ public abstract class ORB
throw new NO_IMPLEMENT();
}
/**
* Create typecode, defining the sequence of the elements, having
* the given type.
@@ -554,7 +568,6 @@ public abstract class ORB
*/
public abstract TypeCode create_wstring_tc(int bound);
/**
* Create a typecode for an abstract interface. The abstract interface
* can be either CORBA object or CORBA value type.
@@ -675,15 +688,19 @@ public abstract class ORB
/**
* This should return the information, related to the current thread.
* The information is needed, for instance, to get the current object
* from the code that serves several objects in parallel threads.
* The {@link Current} is very general interface, with no fields and
* operations defined. This method is not implemented in Suns
* releases at least till v1.4 inclusive.
* releases at least till v1.5 inclusive. To obtain the
* {@link org.omg.PortableServer.Current}, use
* {@link #resolve_initial_references}, passing "POACurrent".
*
* @deprecated since 1.2
* @deprecated since 1.2, use {@link #resolve_initial_references}.
*
* @return never
*
* @throws NO_IMPLEMENT, always.
* @throws NO_IMPLEMENT always.
*/
public Current get_current()
{
@@ -693,7 +710,7 @@ public abstract class ORB
/**
* This should return the information about the CORBA facilities and
* services, available from this ORB. However this method is oficially
* documented as not implemented at least till v1.4 inclusive.
* documented as not implemented at least till v1.5 inclusive.
*
* @param service_type a type of the service being requested. The OMG
* specification currently defines only one value, 1, for security
@@ -705,10 +722,11 @@ public abstract class ORB
* @return should return true if the service information is available
* from the ORB, but this method never returns.
*
* @throws NO_IMPLEMENT, always.
* @throws NO_IMPLEMENT always.
*/
public boolean get_service_information(short service_type,
ServiceInformationHolder service_info)
ServiceInformationHolder service_info
)
{
throw new NO_IMPLEMENT();
}
@@ -846,7 +864,44 @@ public abstract class ORB
* Find and return the easily accessible CORBA object, addressed
* by name. The returned object is typically casted to the more
* specific reference using the <code>narrow(Object)</code> method
* of its helper.
* of its helper. The method resolves the following string values,
* returning the working objects:
* <table border="1"><tr><th>String</th><th>Object class</th>
* <th>Object use</th></tr>
*
* <tr><td>NameService</td><td>{@link org.omg.CosNaming.NamingContextExt}</td>
* <td>Finds (usually remote) object by its name.</td></tr>
*
* <tr><td>RootPOA</td><td>{@link org.omg.PortableServer.POA}</td>
* <td>Holds the POA tree for this ORB, where since 1.4 all servants
* should be connected.</td></tr>
*
* <tr><td>RootPOAManager</td><td>{@link org.omg.PortableServer.POAManager}
* </td><td>Regulates (suspends/resumes) the root POA
* activity</td></tr>
*
* <tr><td>POACurrent</td><td>{@link org.omg.PortableServer.Current}
* </td><td>Informs the current thread about the Id and POA of the
* object being currently served (the methods of
* <code>Current</code> return different values for
* different threads).
* </td></tr>
*
* <tr><td>CodecFactory</td><td>{@link org.omg.IOP.Codec}</td>
* <td>Encodes/decodes IDL data types into/from byte arrays.</td>
* </tr>
*
* <tr><td>DynAnyFactory</td><td>{@link org.omg.DynamicAny.DynAnyFactory}</td>
* <td>Creates DynAny's.</td>
* </tr>
*
* <tr><td>PICurrent</td><td>{@link org.omg.PortableInterceptor.Current}</td>
* <td>Contains multiple slots where an interceptor can rememeber the
* request - specific values between subsequent
* calls of the interceptor methods.</td>
* </tr>
*
* </table>
*
* @param name the object name.
* @return the object
@@ -887,36 +942,80 @@ public abstract class ORB
{
}
/**
* Checks if the ORB needs the main thread to perform some work.
* The method should return true if the ORB needs the main thread,
* and false if it does not.
*
* This method is part of the support for the distribute use of the
* single execution thread.
*
* Same as in Suns releases at least till 1.4 inclusive,
* the distributed use of the single thread is not implemented.
* Use multiple threads, provided by jre.
*
* @return false, always.
*/
/**
* Checks if the ORB needs the main thread to perform some work.
* The method should return true if the ORB needs the main thread,
* and false if it does not.
*
* This method is part of the support for the distribute use of the
* single execution thread.
*
* Same as in Suns releases at least till 1.4 inclusive,
* the distributed use of the single thread is not implemented.
* Use multiple threads, provided by jre.
*
* @return false, always.
*/
public boolean work_pending()
{
return false;
}
/**
* Find and return the CORBA object, addressed by the given
* IOR string representation. The object can (an usually is)
* <p>Find and return the CORBA object, addressed by the given
* string representation. The object can be (an usually is)
* located on a remote computer, possibly running a different
* (not necessary java) CORBA implementation. The returned
* object is typically casted to the more specific reference
* using the <code>narrow(Object)</code> method of its helper.
* </p><p>
* This function supports the following input formats:<br>
* 1. IOR reference (<b>ior:</b>nnnnn ..), usually computer generated.<br>
* 2. <b>corbaloc:</b>[<b>iiop</b>][version.subversion<b>@</b>]<b>:</b>host[<b>:</b>port]<b>/</b><i>key</i>
* defines similar information as IOR reference, but is more human readable.
* This type of reference may also contain multiple addresses (see
* OMG documentation for complete format).<br>
* 3. <b>corbaloc:rir:/</b><i>name</i> defines internal reference on this
* ORB that is resolved using {@link #resolve_initial_references}, passing
* the given <i>name</i> as parameter.<br>
* 4. <b>corbaname:rir:#</b><i>name</i> states that the given <i>name</i>
* must be resolved using the naming service, default for this ORB.<br>
* 5. <b>corbaname:</b>[<b>iiop</b>][version.subversion<b>@</b>]<b>:</b>host[<b>:</b>port]<b>#</b><i>name</i>
* states that the <i>name</i> must be resolved using the naming service
* that runs on the given host at the given port. The ORB expects to find
* there the {@link org.omg.CosNaming.NamingContext} under the key
* "NameService.<br>
*
* <p>The default port is always 2809. The default iiop version is 1.0
* that now may not always be supported, so we would recommend to specify
* the version explicitly.</p>
* <p>
* The examples of the corbaloc and corbaname addresses:<br>
* corbaname:rir:#xobj - ask local naming service for "xobj".<br>
* corbaname:rir:/NameService#xobj - same (long form).<br>
* corbaname:iiop:1.2@localhost:900#xobj - same, assuming that the naming
* service runs at port 900 on the local host and supports iiop 1.2.<br>
* corbaname:iiop:localhost#xobj - same, assuming that the naming
* service runs at port 2809 on the local host and supports iiop 1.0.<br>
* corbaloc::gnu.xxx.yy/Prod/TradingService - the object exists on the
* host gnu.xxx.yy, port 2809 having the key "Prod/TradingService". Its ORB
* supports iiop 1.0.<br>
* corbaloc::gnu.xxx.yy/Prod/TradingService:801 - the object exists on the
* host gnu.xxx.yy, port 801 having the key "Prod/TradingService". Its ORB
* supports iiop 1.0 (iiop keyword ommitted).<br>
* corbaloc:iiop:1.1@gnu.xxx.yy/Prod/TradingService - the object exists on the
* host gnu.xxx.yy, port 801 having the key "Prod/TradingService". Its ORB
* supports iiop 1.1.<br>
* corbaloc:rir:/NameService - the default naming service.
*
* @param IOR the object IOR representation string.
*
* @return the found CORBA object.
*
* @throws BAD_PARAM if the string being parsed is invalid.
* @throws DATA_CONVERSION if the string being parsed contains unsupported
* prefix or protocol.
*
* @see object_to_string(org.omg.CORBA.Object)
*/
public abstract Object string_to_object(String IOR);
@@ -1098,4 +1197,4 @@ public abstract class ORB
why
);
}
}
}
@@ -50,10 +50,7 @@ import org.omg.CORBA.portable.OutputStream;
*/
public abstract class ObjectHelper
{
/**
* The cached binding list type code.
*/
private static TypeCode typeCode = new primitiveTypeCode(TCKind.tk_objref);
static TypeCode typeCode;
/**
* Extract the array of object from the given {@link Any}.
@@ -100,6 +97,8 @@ public abstract class ObjectHelper
*/
public static TypeCode type()
{
if (typeCode == null)
typeCode = ORB.init().get_primitive_tc(TCKind.tk_objref);
return typeCode;
}
@@ -39,6 +39,7 @@ exception statement from your version. */
package org.omg.CORBA;
import gnu.CORBA.primitiveTypeCode;
import gnu.CORBA.recordTypeCode;
import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.OutputStream;
@@ -59,10 +60,16 @@ public final class ObjectHolder
implements Streamable
{
/**
* The default type code for this holder.
* The default type code for this holder if the object type code with
* the zero length string as id.
*/
private static final TypeCode t_object =
new primitiveTypeCode(TCKind.tk_objref);
private static final recordTypeCode t_object;
static
{
t_object = new recordTypeCode(TCKind.tk_objref);
t_object.setId("");
}
/**
* The <code>org.omg.CORBA.Object</code> (CORBA <code>Object</code>) value,
@@ -109,7 +116,7 @@ public final class ObjectHolder
*/
public TypeCode _type()
{
return t_object;
return ObjectHelper.type();
}
/**
@@ -124,4 +131,4 @@ public final class ObjectHolder
{
output.write_Object(value);
}
}
}
@@ -38,9 +38,10 @@ exception statement from your version. */
package org.omg.CORBA;
import gnu.CORBA.ServiceDetailHolder;
import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.OutputStream;
import gnu.CORBA.*;
/**
* The helper operations on the Service Detail.
@@ -140,8 +141,8 @@ public abstract class ServiceDetailHelper
TypeCode type =
orb.create_alias_tc(_id, "ServiceDetailType",
orb.get_primitive_tc(TCKind.tk_ulong)
);
orb.get_primitive_tc(TCKind.tk_ulong)
);
members [ 0 ] = new StructMember("service_detail_type", type, null);
TypeCode data =
@@ -166,7 +167,7 @@ public abstract class ServiceDetailHelper
ostream.write_ulong(value.service_detail_type);
ostream.write_long(value.service_detail.length);
ostream.write_octet_array(value.service_detail, 0,
value.service_detail.length
);
value.service_detail.length
);
}
}
}
+33 -33
View File
@@ -38,11 +38,11 @@ exception statement from your version. */
package org.omg.CORBA;
import java.io.Serializable;
import org.omg.CORBA.TypeCodePackage.BadKind;
import org.omg.CORBA.portable.IDLEntity;
import java.io.Serializable;
/**
* An information about a CORBA data type.
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
@@ -57,10 +57,12 @@ public abstract class TypeCode
private static final long serialVersionUID = -6521025782489515676L;
/**
* Returns the concrete base type for this TypeCode.
* @return a TypeCode, defining the concrete base type for this
* Typecode.
* @throws org.omg.CORBA.TypeCodePackage.BadKind
* For value types that support inheritance this method returns the
* of the ancestor type code.
*
* @return the ancestor TypeCode.
*
* @throws BadKind for all typecodes except the value type typecodes.
*/
public abstract TypeCode concrete_base_type()
throws BadKind;
@@ -69,7 +71,7 @@ public abstract class TypeCode
* For sequences, arrays, aliases and value boxes, returns the IDL type for
* the members of the object.
* @return a TypeCode of the memebers of this type.
* @throws org.omg.CORBA.TypeCodePackage.BadKind for types other than
* @throws BadKind for types other than
* sequences, arrays, aliases and value boxes.
*/
public abstract TypeCode content_type()
@@ -79,7 +81,7 @@ public abstract class TypeCode
* For unions, returs the index of the default member.
* @return the index of the default member, -1 if there is
* no default member.
* @throws org.omg.CORBA.TypeCodePackage.BadKind if this type is not
* @throws BadKind if this type is not
* a union.
*/
public abstract int default_index()
@@ -88,15 +90,15 @@ public abstract class TypeCode
/**
* Returs definition of member labels for untions
* @return a TypeCode, describing all non-default member labels.
* @throws org.omg.CORBA.TypeCodePackage.BadKind if this type is not a
* @throws BadKind if this type is not a
* union.
*/
public abstract TypeCode discriminator_type()
throws BadKind;
/**
* Test two types for equality. The default implementation
* returs true of the types of the same kind.
* Test two types for equality.
*
* @param other the other type to compere with
* @return true if the types are interchangeable.
*/
@@ -112,7 +114,7 @@ public abstract class TypeCode
/**
* For the fixed type, returns the number of digits.
* @return the number of digits for the fixed type
* @throws org.omg.CORBA.TypeCodePackage.BadKind if this is not a fixed
* @throws BadKind if this is not a fixed
* type.
*/
public abstract short fixed_digits()
@@ -123,7 +125,7 @@ public abstract class TypeCode
* positive (the number of digits to the right of the decimal point) or
* negative (adds zeros to the left of the decimal point).
* @return the scale.
* @throws org.omg.CORBA.TypeCodePackage.BadKind if this is not a fixed
* @throws BadKind if this is not a fixed
* type.
*/
public abstract short fixed_scale()
@@ -140,7 +142,7 @@ public abstract class TypeCode
* Returns the RepositoryId globally identifying the type, defined by
* this TypeCode.
* @return tje RepositoryId. In some cases, it may be an empty string.
* @throws org.omg.CORBA.TypeCodePackage.BadKind if the type is other than
* @throws BadKind if the type is other than
* reference, structure, union, enumeration, alias, exception, valuetype,
* boxed valuetype and also native and abstract interfaces.
*/
@@ -161,7 +163,7 @@ public abstract class TypeCode
*
* @return length or bound
*
* @throws org.omg.CORBA.TypeCodePackage.BadKind for types other than
* @throws BadKind for types other than
* string, sequence and array.
*/
public abstract int length()
@@ -171,7 +173,7 @@ public abstract class TypeCode
* Returns the number of type memebers.
*
* @return the number of memebers
* @throws org.omg.CORBA.TypeCodePackage.BadKind for types other than
* @throws BadKind for types other than
* structure, union, enumeration or exception.
*/
public abstract int member_count()
@@ -185,14 +187,14 @@ public abstract class TypeCode
*
* @return the label
*
* @throws org.omg.CORBA.TypeCodePackage.BadKind if this is not a union
* @throws BadKind if this is not a union
* type.
* @throws org.omg.CORBA.TypeCodePackage.Bounds if the index is out of
* valid bounds.
*/
public abstract Any member_label(int index)
throws BadKind,
org.omg.CORBA.TypeCodePackage.Bounds;
throws BadKind,
org.omg.CORBA.TypeCodePackage.Bounds;
/**
* Retrieves the simple name of the member identified by the given index.
@@ -201,14 +203,14 @@ public abstract class TypeCode
*
* @return the member name that in some cases can be an empty string.
*
* @throws org.omg.CORBA.TypeCodePackage.BadKind for types other than
* @throws BadKind for types other than
* structure, union or enumeration.
* @throws org.omg.CORBA.TypeCodePackage.Bounds if the index is out of
* valid bounds.
*/
public abstract String member_name(int index)
throws BadKind,
org.omg.CORBA.TypeCodePackage.Bounds;
throws BadKind,
org.omg.CORBA.TypeCodePackage.Bounds;
/**
* Retrieves the member type of the member identified by the given index.
@@ -217,14 +219,14 @@ public abstract class TypeCode
*
* @return the member type.
*
* @throws org.omg.CORBA.TypeCodePackage.BadKind for types other than
* @throws BadKind for types other than
* structure, union, enumeration or exception.
* @throws org.omg.CORBA.TypeCodePackage.Bounds if the index is out of
* valid bounds.
*/
public abstract TypeCode member_type(int index)
throws BadKind,
org.omg.CORBA.TypeCodePackage.Bounds;
throws BadKind,
org.omg.CORBA.TypeCodePackage.Bounds;
/**
* Returns the visibility scope of the member at the given index.
@@ -234,22 +236,21 @@ public abstract class TypeCode
*
* @return either PRIVATE_MEMBER.value or PUBLIC_MEMBER.value
*
* @throws org.omg.CORBA.TypeCodePackage.BadKind if this is not a non boxed
* @throws BadKind if this is not a non boxed
* value type.
*
* @throws org.omg.CORBA.TypeCodePackage.Bounds if the index is out of
* valid bounds.
*/
public abstract short member_visibility(int index)
throws BadKind,
org.omg.CORBA.TypeCodePackage.Bounds;
throws BadKind,
org.omg.CORBA.TypeCodePackage.Bounds;
/**
* Retrieves the simple name identifying this TypeCode object
* within its enclosing scope.
* @return the name, can be an empty string.
* @throws org.omg.CORBA.TypeCodePackage.BadKind for typer other than
* @throws BadKind for typer other than
* reference, structure, union, enumeration, alias, exception,
* valuetype, boxed valuetype, native, and abstract interface
*/
@@ -263,9 +264,8 @@ public abstract class TypeCode
* VM_NONE.value, VM_ABSTRACT.value, VM_CUSTOM.value, or
* VM_TRUNCATABLE.value,
*
* @throws org.omg.CORBA.TypeCodePackage.BadKind for types other than
* value type.
* @throws BadKind for all types other than value type.
*/
public abstract short type_modifier()
throws BadKind;
}
}
+73 -33
View File
@@ -40,41 +40,81 @@ exception statement from your version. -->
<head><title>GNU Classpath - org.omg.CORBA</title></head>
<body>
This package provides the support of <a href="www.omg.org">OMG</a>
<a href="www.CORBA.org">CORBA</a>; see <a href="#overview">overview</a>
of the implemented functionality. CORBA is an open, vendor independent
system that applications use to work together over networks. Thie purpose
of this package is to provide CORBA APIs to java programming language,
including the fully functional Object Request Broker ({@link org.omg.CORBA.ORB}).
This package provides the support of <a href="http://www.CORBA.org">CORBA</a>;
see <a href="#overview">overview</a> of the implemented functionality.
<p>
CORBA a system that applications use to work over networks. CORBA messages
are binary, not text oriented. They practically cary no "data wrapping"
information like XML &lt;opening&gt; &lt;/closing&gt; tags. Hence CORBA
objects easier exchange large amounts of binary data. CORBA can work
in such data-intensive application areas as telecommunications or radio
broadcasting. Java programs connect to CORBA objects without care
about what platform they run on, where they exist in the network, or what
language they were written in. The remote CORBA objects appear to the
programmer as the ordinary Java objects and can be passed as
parameters in both remote or local method invocations.
</p><p>
The CORBA processing unit is divided into {@link org.omg.CORBA.Object}
that is exposed to the client and the servant
({@link org.omg.PortableServer.Servant} where the method, invoked on
object, is finally delegated. It can be multiple objects per servant or
multiple servants per object. The servant for particular object or
even particular call can be dynamically chosen at run time using
{@link org.omg.PortableServer.ServantManager}.
</p><p>
All stages of both local and remote invocations on CORBA objects can be
monitored and modified using {@link org.omg.PortableInterceptor.Interceptor}.
The interceptors can add an extra data to the CORBA message (these data
can be later accessed by other interceptor on remote side).
</p>
<a name="overview">
<h4>Overview of the currently implemented CORBA functionality</h4>
<p>The CORBA implementation in the Classpath project is now a working prototype.
This prototype is interoperable with Sun's implementation v 1.4, transferring
object references, primitive types, narrow and wide strings, arrays, structures
and trees between these two platforms. The thrown exceptions are also transferred
and handled. The support for stringified object references (IORs) is implemented.
The redirection commands works, LOCATION_FORWARD_PERM changing the target address
until the application is restarted and LOCATION_FORWARD redirecting for the
current session only. Both Little and Big Endian encoded messages
are accepted. The encoding of the sent messages is the same as used in the
stringified IOR reference of that object or Big Endian, if no such data
available.
</p>
<p>
The current release supports the Value types that appeared since v 1.3 and are
something between CORBA structures (no methods, data local) and CORBA objects
(both methods and data remote). Value type has local data, can have
local methods and is transferred by value, not by IOR reference.
</p>
<p>
You can use both request-oriented (based on {@link org.omg.CORBA.Request})
and stream-oriented (based on {@link org.omg.CORBA.portable.ObjectImpl})
invocation models. The current release includes the working examples, demonstrating
the client-server communication using both methods. These examples also show,
how to use the Classpath naming service. The IDL compiler is not yet written,
but as a side effect of the required compatibility, the implementation seems
accepting the output of the Sun's 1.3 idlj.</p>
The CORBA implementation in the Classpath project is now a working
prototype.
<ul>
<li>This prototype is interoperable with Sun's implementation v 1.4,
transferring object references, primitive types, narrow and wide strings,
arrays, structures and trees between these two platforms.
</li>
<li>The prototype provides interoperable support for the Abstract interface
and Value types. Those appear in 1.3, being a feature of CORBA 2.3.
</li>
<li>The remote exceptions are also transferred and handled as expected.
</li>
<li>The support for parsing stringified object references (IORs), both
Big and Little Endian encoded, is implemented.
</li>
<li>The redirection commands works, LOCATION_FORWARD_PERM changing the
target address until the application is restarted and LOCATION_FORWARD
redirecting for the current session only.
</li>
<li>Both Little and Big Endian encoded messages are accepted. The encoding
of the sent messages is the same as used in the stringified IOR reference
of that object or Big Endian, if no such data available.
</li>
<li>You can use both request-oriented (based on {@link org.omg.CORBA.Request}
and stream-oriented (based on {@link org.omg.CORBA.portable.ObjectImpl}
invocation models. The current release includes the working examples,
demonstrating the client-server communication using both methods.
</li>
<li>These examples also show, how to use the Classpath naming service.
</li>
<li>The IDL compiler is not yet written (and not even started), but as a
side effect of the required compatibility, the implementation seems
accepting the output of the Sun's idlj.
</li>
<li>The Portable Object Adapter is already released. For details on POA,
see the {@link org.omg.PortableServer} package.</li>
<li>We provide the implementation of the {@link org.omg.DynamicAny}
package. ORB returns the working DynAnyFactory that produces working
DynAny's as defined in OMG specification.</li>
<li>The Portable Interceptor is also complete. See
{@link org.omg.PortableInterceptor} package for details how to register
and use CORBA interceptors.
<li>All GNU Classpath classes in omg.org namespace are newly written using
the OMG .pdf document (Version 3.0.3, formal/04-03-12).
</li>
</ul>
@author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
</body>
@@ -185,7 +185,6 @@ public abstract class ObjectImpl
/**
* Invoke the operation.
*
* @param target the invocation target.
* @param output the stream, containing the written arguments.
*
* @return the stream, from where the input parameters could be read.
@@ -286,7 +285,8 @@ public abstract class ObjectImpl
*/
public void _releaseReply(InputStream stream)
{
delegate.releaseReply(this, stream);
if (delegate != null)
delegate.releaseReply(this, stream);
}
/**
@@ -387,7 +387,10 @@ public abstract class ObjectImpl
*/
public boolean equals(java.lang.Object other)
{
return delegate.equals(this, other);
if (delegate == null)
return this == other;
else
return delegate.equals(this, other);
}
/**
@@ -399,4 +402,4 @@ public abstract class ObjectImpl
{
return delegate.toString(this);
}
}
}
@@ -40,7 +40,9 @@ package org.omg.CORBA_2_3.portable;
import gnu.CORBA.CDR.Vio;
import org.omg.CORBA.MARSHAL;
import org.omg.CORBA.portable.BoxedValueHelper;
import org.omg.CORBA.portable.ValueFactory;
import java.io.Serializable;
@@ -170,7 +172,7 @@ public abstract class InputStream
*/
public Serializable read_value(Serializable unitialised_value)
{
return Vio.read(this, unitialised_value);
return (Serializable) Vio.read(this, unitialised_value, null);
}
/**
@@ -190,8 +192,11 @@ public abstract class InputStream
*/
public Serializable read_value(String repository_id)
{
return ((org.omg.CORBA_2_3.ORB) orb()).lookup_value_factory(repository_id)
.read_value(this);
ValueFactory factory =
((org.omg.CORBA_2_3.ORB) orb()).lookup_value_factory(repository_id);
if (factory == null)
throw new MARSHAL("No factory");
return (Serializable) Vio.read(this, null, factory);
}
/**
@@ -203,6 +208,6 @@ public abstract class InputStream
*/
public Serializable read_value(BoxedValueHelper helper)
{
return helper.read_value(this);
return Vio.read(this, helper);
}
}
@@ -117,7 +117,7 @@ public abstract class OutputStream
*/
public void write_value(Serializable value, BoxedValueHelper helper)
{
helper.write_value(this, value);
Vio.write(this, value, helper);
}
/**
@@ -55,7 +55,7 @@ import org.omg.CosNaming.NamingContextPackage.NotFound;
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public interface NamingContextOperations
extends org.omg.CORBA.Object, IDLEntity
extends IDLEntity
{
/**
* Gives the object a name, valid in this context.
@@ -66,7 +66,7 @@ public abstract class _NamingContextExtImplBase
extends _NamingContextImplBase
implements NamingContextExt, InvokeHandler
{
private static Hashtable _methods = new Hashtable();
static Hashtable _methods = new Hashtable();
static
{
@@ -78,8 +78,9 @@ public abstract class _NamingContextImplBase
/**
* As there are quite many methods, it may be sensible to use the hashtable.
* This field is also reused in NamingContextPOA.
*/
private static Hashtable methods = new Hashtable();
static Hashtable methods = new Hashtable();
/**
* Put all methods into the table.
@@ -55,7 +55,7 @@ import java.io.Serializable;
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class ServiceContext
public final class ServiceContext
implements IDLEntity, Serializable
{
/**
@@ -40,6 +40,7 @@ package org.omg.IOP;
import org.omg.CORBA.Any;
import org.omg.CORBA.BAD_OPERATION;
import org.omg.CORBA.MARSHAL;
import org.omg.CORBA.ORB;
import org.omg.CORBA.StructMember;
import org.omg.CORBA.TCKind;
@@ -47,11 +48,13 @@ import org.omg.CORBA.TypeCode;
import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.OutputStream;
import java.io.IOException;
/**
* A helper operations for the {@link TaggedComponent}.
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
* A helper operations for the {@link TaggedComponent}.
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public abstract class TaggedComponentHelper
{
/**
@@ -60,49 +63,46 @@ public abstract class TaggedComponentHelper
private static TypeCode typeCode;
/**
* Create the TaggedComponent typecode (structure,
* named "TaggedComponent").
* The typecode states that the structure contains the
* following fields: tag, component_data.
* Create the TaggedComponent typecode (structure, named "TaggedComponent").
* The typecode states that the structure contains the following fields: tag,
* component_data.
*/
public static TypeCode type()
{
if (typeCode == null)
{
ORB orb = ORB.init();
StructMember[] members = new StructMember[ 2 ];
StructMember[] members = new StructMember[2];
TypeCode field;
field =
orb.create_alias_tc("IDL:omg.org/IOP/ComponentId:1.0", "ComponentId",
orb.get_primitive_tc(TCKind.tk_ulong)
);
members [ 0 ] = new StructMember("tag", field, null);
field = orb.create_alias_tc("IDL:omg.org/IOP/ComponentId:1.0",
"ComponentId",
orb.get_primitive_tc(TCKind.tk_ulong));
members[0] = new StructMember("tag", field, null);
field =
orb.create_sequence_tc(0, orb.get_primitive_tc(TCKind.tk_octet));
members [ 1 ] = new StructMember("component_data", field, null);
field = orb.create_sequence_tc(0, orb.get_primitive_tc(TCKind.tk_octet));
members[1] = new StructMember("component_data", field, null);
typeCode = orb.create_struct_tc(id(), "TaggedComponent", members);
}
return typeCode;
}
/**
* Insert the TaggedComponent into the given Any.
* This method uses the TaggedComponentHolder.
*
* @param any the Any to insert into.
* @param that the TaggedComponent to insert.
*/
* Insert the TaggedComponent into the given Any. This method uses the
* TaggedComponentHolder.
*
* @param any the Any to insert into.
* @param that the TaggedComponent to insert.
*/
public static void insert(Any any, TaggedComponent that)
{
any.insert_Streamable(new TaggedComponentHolder(that));
}
/**
* Extract the TaggedComponent from given Any.
* This method uses the TaggedComponentHolder.
* Extract the TaggedComponent from given Any. This method uses the
* TaggedComponentHolder.
*
* @throws BAD_OPERATION if the passed Any does not contain TaggedComponent.
*/
@@ -132,9 +132,8 @@ public abstract class TaggedComponentHelper
/**
* Read the structure from the CDR intput stream. Expects the integer
* identifier of the tag, then the size of the tag data
* and then the specified number of bytes, representing the data
* of the tag.
* identifier of the tag, then the size of the tag data and then the specified
* number of bytes, representing the data of the tag.
*
* @param input a org.omg.CORBA.portable stream to read from.
*/
@@ -142,17 +141,24 @@ public abstract class TaggedComponentHelper
{
TaggedComponent value = new TaggedComponent();
value.tag = input.read_long();
value.component_data = new byte[ input.read_long() ];
for (int i0 = 0; i0 < value.component_data.length; i0++)
value.component_data [ i0 ] = input.read_octet();
value.component_data = new byte[input.read_long()];
try
{
input.read(value.component_data);
}
catch (IOException e)
{
MARSHAL m = new MARSHAL();
m.initCause(e);
throw m;
}
return value;
}
/**
* Write the structure to the CDR output stream.
* Writes the integer identifier of the tag, then the size of the tag data
* and then the specified number of bytes, representing the data
* of the tag.
* Write the structure to the CDR output stream. Writes the integer identifier
* of the tag, then the size of the tag data and then the specified number of
* bytes, representing the data of the tag.
*
* @param output a org.omg.CORBA.portable stream stream to write into.
* @param value a value to write.
@@ -161,7 +167,16 @@ public abstract class TaggedComponentHelper
{
output.write_long(value.tag);
output.write_long(value.component_data.length);
for (int i0 = 0; i0 < value.component_data.length; i0++)
output.write_octet(value.component_data [ i0 ]);
try
{
output.write(value.component_data);
}
catch (IOException e)
{
MARSHAL m = new MARSHAL();
m.initCause(e);
throw m;
}
}
}
@@ -38,8 +38,12 @@ exception statement from your version. */
package org.omg.IOP;
import gnu.CORBA.CDR.cdrBufInput;
import gnu.CORBA.CDR.cdrBufOutput;
import org.omg.CORBA.Any;
import org.omg.CORBA.BAD_OPERATION;
import org.omg.CORBA.MARSHAL;
import org.omg.CORBA.ORB;
import org.omg.CORBA.StructMember;
import org.omg.CORBA.TCKind;
@@ -47,11 +51,13 @@ import org.omg.CORBA.TypeCode;
import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.OutputStream;
import java.io.IOException;
/**
* A helper operations for the structure {@link TaggedProfile}.
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
* A helper operations for the structure {@link TaggedProfile}.
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public abstract class TaggedProfileHelper
{
/**
@@ -60,49 +66,46 @@ public abstract class TaggedProfileHelper
private static TypeCode typeCode;
/**
* Create the TaggedProfile typecode (structure,
* named "TaggedProfile").
* The typecode states that the structure contains the
* following fields: tag, profile_data.
* Create the TaggedProfile typecode (structure, named "TaggedProfile"). The
* typecode states that the structure contains the following fields: tag,
* profile_data.
*/
public static TypeCode type()
{
if (typeCode == null)
{
ORB orb = ORB.init();
StructMember[] members = new StructMember[ 2 ];
StructMember[] members = new StructMember[2];
TypeCode field;
field =
orb.create_alias_tc("IDL:omg.org/IOP/ProfileId:1.0", "ProfileId",
orb.get_primitive_tc(TCKind.tk_ulong)
);
members [ 0 ] = new StructMember("tag", field, null);
field = orb.create_alias_tc("IDL:omg.org/IOP/ProfileId:1.0",
"ProfileId",
orb.get_primitive_tc(TCKind.tk_ulong));
members[0] = new StructMember("tag", field, null);
field =
orb.create_sequence_tc(0, orb.get_primitive_tc(TCKind.tk_octet));
members [ 1 ] = new StructMember("profile_data", field, null);
field = orb.create_sequence_tc(0, orb.get_primitive_tc(TCKind.tk_octet));
members[1] = new StructMember("profile_data", field, null);
typeCode = orb.create_struct_tc(id(), "TaggedProfile", members);
}
return typeCode;
}
/**
* Insert the TaggedProfile into the given Any.
* This method uses the TaggedProfileHolder.
*
* @param any the Any to insert into.
* @param that the TaggedProfile to insert.
*/
* Insert the TaggedProfile into the given Any. This method uses the
* TaggedProfileHolder.
*
* @param any the Any to insert into.
* @param that the TaggedProfile to insert.
*/
public static void insert(Any any, TaggedProfile that)
{
any.insert_Streamable(new TaggedProfileHolder(that));
}
/**
* Extract the TaggedProfile from given Any.
* This method uses the TaggedProfileHolder.
* Extract the TaggedProfile from given Any. This method uses the
* TaggedProfileHolder.
*
* @throws BAD_OPERATION if the passed Any does not contain TaggedProfile.
*/
@@ -139,9 +142,18 @@ public abstract class TaggedProfileHelper
{
TaggedProfile value = new TaggedProfile();
value.tag = input.read_long();
value.profile_data = new byte[ input.read_long() ];
for (int i0 = 0; i0 < value.profile_data.length; i0++)
value.profile_data [ i0 ] = input.read_octet();
if (input instanceof cdrBufInput)
{
// Highly probable.
value.profile_data = ((cdrBufInput) input).read_sequence();
}
else
{
value.profile_data = new byte[input.read_long()];
for (int i0 = 0; i0 < value.profile_data.length; i0++)
value.profile_data[i0] = input.read_octet();
}
return value;
}
@@ -154,8 +166,27 @@ public abstract class TaggedProfileHelper
public static void write(OutputStream output, TaggedProfile value)
{
output.write_long(value.tag);
output.write_long(value.profile_data.length);
for (int i0 = 0; i0 < value.profile_data.length; i0++)
output.write_octet(value.profile_data [ i0 ]);
if (output instanceof cdrBufOutput)
{
// Highly probable.
output.write_long(value.profile_data.length);
try
{
output.write(value.profile_data);
}
catch (IOException e)
{
MARSHAL m = new MARSHAL();
m.initCause(e);
throw m;
}
}
else
{
output.write_long(value.profile_data.length);
for (int i0 = 0; i0 < value.profile_data.length; i0++)
output.write_octet(value.profile_data[i0]);
}
}
}
@@ -38,7 +38,8 @@ exception statement from your version. */
package org.omg.PortableInterceptor;
/**
/**
* A reply status flag, indicating, that the object has
* moved (temporary or permanently) to another location.
*
@@ -50,4 +51,4 @@ public interface LOCATION_FORWARD
* Specifies the LOCATION_FORWARD value, 3.
*/
short value = 3;
}
}
@@ -42,30 +42,28 @@ import org.omg.CORBA.UserException;
import org.omg.CORBA.portable.IDLEntity;
import java.io.Serializable;
import gnu.CORBA.*;
/**
* This exception is raised on an attempt to register a second
* {@link org.omg.PortableInterceptor#Interceptor} with the same name.
* For each {@link org.omg.PortableInterceptor#Interceptor} type, only
* one {@link org.omg.PortableInterceptor#Interceptor} of a given name can
* be registered with the {@link org.omg.CORBA.ORB}.
*
* @see org.omg.PortableInterceptor.ORBInitInfoOperations
*
* @author Audrius Meskauskas, Lithiania (AudriusA@Bioinformatics.org)
*/
public class DuplicateName
extends UserException
implements IDLEntity, Serializable
* This exception is raised on an attempt to register a second
* {@link org.omg.PortableInterceptor#Interceptor} with the same name.
* For each {@link org.omg.PortableInterceptor#Interceptor} type, only
* one {@link org.omg.PortableInterceptor#Interceptor} of a given name can
* be registered with the {@link org.omg.CORBA.ORB}.
*
* @see org.omg.PortableInterceptor.ORBInitInfoOperations
*
* @author Audrius Meskauskas, Lithiania (AudriusA@Bioinformatics.org)
*/
public class DuplicateName extends UserException implements IDLEntity,
Serializable
{
/**
* Use serialVersionUID (v1.4) for interoperability.
*/
private static final long serialVersionUID = 7748239257677851130L;
/**
* Use serialVersionUID (v1.4) for interoperability.
*/
private static final long serialVersionUID = 7748239257677851130L;
/**
* The name field.
* The name that appears to be duplicate.
*/
public String name;
@@ -38,6 +38,8 @@ exception statement from your version. */
package org.omg.PortableInterceptor.ORBInitInfoPackage;
import gnu.CORBA.*;
import org.omg.CORBA.Any;
import org.omg.CORBA.BAD_OPERATION;
import org.omg.CORBA.ORB;
@@ -46,13 +48,12 @@ import org.omg.CORBA.TCKind;
import org.omg.CORBA.TypeCode;
import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.OutputStream;
import gnu.CORBA.*;
/**
* The helper operations for the exception {@link DuplicateName}.
*
* @author Audrius Meskauskas, Lithiania (AudriusA@Bioinformatics.org)
*/
* The helper operations for the exception {@link DuplicateName}.
*
* @author Audrius Meskauskas, Lithiania (AudriusA@Bioinformatics.org)
*/
public abstract class DuplicateNameHelper
{
/**
@@ -83,12 +84,12 @@ public abstract class DuplicateNameHelper
}
/**
* Insert the DuplicateName into the given Any.
* This method uses the DuplicateNameHolder.
*
* @param any the Any to insert into.
* @param that the DuplicateName to insert.
*/
* Insert the DuplicateName into the given Any.
* This method uses the DuplicateNameHolder.
*
* @param any the Any to insert into.
* @param that the DuplicateName to insert.
*/
public static void insert(Any any, DuplicateName that)
{
any.insert_Streamable(new DuplicateNameHolder(that));
@@ -44,17 +44,16 @@ import org.omg.CORBA.portable.IDLEntity;
import java.io.Serializable;
/**
* This exception is raised by methods in
* {@link org.omg.PortableInterceptor.ORBInitInfoOperations} on the attempt to
* register or resolve an invalid name like empty string. The already
* registered names (including the default names, defined by OMG) are also
* invalid for registration.
*
* @author Audrius Meskauskas, Lithiania (AudriusA@Bioinformatics.org)
*/
public class InvalidName
extends UserException
implements IDLEntity, Serializable
* This exception is raised by methods in
* {@link org.omg.PortableInterceptor.ORBInitInfoOperations} on the attempt to
* register or resolve an invalid name like empty string. The already
* registered names (including the default names, defined by OMG) are also
* invalid for registration.
*
* @author Audrius Meskauskas, Lithiania (AudriusA@Bioinformatics.org)
*/
public class InvalidName extends UserException implements IDLEntity,
Serializable
{
/**
* Use serialVersionUID (v1.4) for interoperability.
@@ -71,7 +70,7 @@ public class InvalidName
/**
* Create the InvalidName with explaining message.
*
* @param why a string, explaining, why this exception has been thrown.
* @param why a string, explaining, why the name is invalid.
*/
public InvalidName(String why)
{
@@ -50,10 +50,10 @@ import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.OutputStream;
/**
* The helper operations for the exception {@link InvalidName}.
*
* @author Audrius Meskauskas, Lithiania (AudriusA@Bioinformatics.org)
*/
* The helper operations for the exception {@link InvalidName}.
*
* @author Audrius Meskauskas, Lithiania (AudriusA@Bioinformatics.org)
*/
public abstract class InvalidNameHelper
{
/**
@@ -38,6 +38,7 @@ exception statement from your version. */
package org.omg.PortableInterceptor;
/**
* A reply status flag, indicating, that the remote method
* has been called and returned without exception.
@@ -50,4 +51,4 @@ public interface SUCCESSFUL
* Specifies the SUCCESSFUL value, 0.
*/
short value = 0;
}
}
@@ -38,6 +38,7 @@ exception statement from your version. */
package org.omg.PortableInterceptor;
/**
* A reply status flag, indicating, that the
* {@link org.omg.CORBA.SystemException}
@@ -51,4 +52,4 @@ public interface SYSTEM_EXCEPTION
* Specifies the SYSTEM_EXCEPTION value, 1.
*/
short value = 1;
}
}
@@ -38,7 +38,8 @@ exception statement from your version. */
package org.omg.PortableInterceptor;
/**
/**
* A reply status, indicating the necessity of the transport retry.
* This may happen, for example, if the GIOP message status flag
* is equal to NEEDS_ADDRESSING_MODE.
@@ -51,4 +52,4 @@ public interface TRANSPORT_RETRY
* Specifies the TRANSPORT_RETRY value, 4.
*/
short value = 4;
}
}
@@ -38,6 +38,7 @@ exception statement from your version. */
package org.omg.PortableInterceptor;
/**
* A reply status flag, indicating, that the
* {@link org.omg.CORBA.UserException}
@@ -51,4 +52,4 @@ public interface USER_EXCEPTION
* Specifies the USER_EXCEPTION value, 2.
*/
short value = 2;
}
}