You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ad...@apache.org on 2005/10/28 04:00:22 UTC
svn commit: r329036 [1/7] - in /geronimo/trunk/sandbox/freeorb: ./
geronimo-orb/ geronimo-orb/src/ geronimo-orb/src/main/
geronimo-orb/src/main/java/ geronimo-orb/src/main/java/org/
geronimo-orb/src/main/java/org/apache/ geronimo-orb/src/main/java/org/...
Author: adc
Date: Thu Oct 27 19:00:06 2005
New Revision: 329036
URL: http://svn.apache.org/viewcvs?rev=329036&view=rev
Log:
Seed code for CORBA server.
GERONIMO-1111
Added:
geronimo/trunk/sandbox/freeorb/
geronimo/trunk/sandbox/freeorb/LICENSE.txt
geronimo/trunk/sandbox/freeorb/geronimo-orb/
geronimo/trunk/sandbox/freeorb/geronimo-orb/pom.xml
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/AbstractORB.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/AnyImpl.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ClientDelegate.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ClientInvocation.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ConnectionManager.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/DNSCache.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/Invocation.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/InvocationProfile.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/InvocationProfileSelector.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ORB.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/PlainObject.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/RepositoryID.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/SingletonORB.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/TypeCodeImpl.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/TypeCodeUtil.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/cdr/
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/cdr/ByteBufferReader.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/cdr/CDRInputStream.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/cdr/CDROutputStream.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/cdr/InputStreamController.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/BufferedOutputChannel.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/ChannelClosedException.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/FilterInputChannel.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/FilterOutputChannel.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/IOSemaphore.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/InputChannel.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/InputHandler.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/MarkHandler.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/OutputChannel.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/OutputChannelMarker.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/RingBuffer.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/RingByteBuffer.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/SocketTransportBase.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/Transport.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/TransportManager.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/classic/
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/classic/ClassicTransportManager.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/classic/SyncClassicTransport.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/nio/
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/nio/AsyncNIOSocketTransport.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/nio/AsyncNIOTransportManager.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/nio/NIOSelector.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/nio/ParticipationExecutor.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/nio/SelectionListener.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/nio/SyncNIOTransport.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/channel/nio/SyncNIOTransportManager.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/concurrency/
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/concurrency/IOSemaphoreClosedException.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/AuthenticationInfo.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/CSIClientRequestInterceptor.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/CSIInterceptorBase.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/CSIInterceptorLoader.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/CSIPolicyFactory.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/CSIServerRequestInterceptor.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/GSSUPIORInterceptor.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/SecurityContext.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/SecurityContextDelegate.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/gssup/
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/gssup/GSSUPPolicy.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/gssup/GSSUPPolicyHelper.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/gssup/GSSUPPolicyHolder.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/gssup/GSSUPPolicyOperations.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/gssup/GSSUPPolicyValue.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/gssup/GSSUPPolicyValueHelper.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/gssup/GSSUPPolicyValueHolder.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/csi/gssup/SecGSSUPPolicy.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/dii/
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/dii/EnvironmentImpl.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/dii/ExceptionListImpl.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/dii/NVListImpl.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/dii/NamedValueImpl.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/dii/RequestImpl.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/giop/
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/giop/GIOPInputStream.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/giop/GIOPMessageTransport.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/giop/GIOPOutputStream.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/giop/InputController.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/giop/RequestID.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/io/
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/io/CharConverter.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/io/ClientConnection.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/io/ClientConnectionFactory.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/io/DefaultConnectionManager.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/io/EncapsulationInputStream.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/io/EncapsulationOutputStream.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/io/FilterInputStream.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/io/GIOPVersion.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/io/IIOPInvocationProfile.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/io/InputStreamBase.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/io/MessageHeader.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/io/MinorCodes.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/io/OutputStreamBase.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/io/SSLClientConnectionFactory.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/io/TCPClientConnectionFactory.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/io/TLSClientConnectionFactory.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/io/ValueWriter.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/AlternateIIOPComponent.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/CodeSetsComponent.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/Component.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/CompoundSecurityMechanism.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/GIOPTransportSpec.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/IIOPProfile.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/IIOPTransportSpec.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/InetTransport.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/InternalIOR.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/InternalServiceContextList.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/InternalTargetAddress.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/MultiComponentProfile.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/ORBTypeComponent.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/Profile.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/SSLSecureTransport.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/SecureInetTransport.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/SecurityMechanismListComponent.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/TLSSecureTransport.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/TaggedValue.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/TransportSpecification.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/UnknownComponent.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/UnknownProfile.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/util/
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/util/IntIter.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/util/IntIterator.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/util/IntegerToObjectHashMap.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/util/IntegerToObjectMap.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/util/StringUtil.java
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/test/
geronimo/trunk/sandbox/freeorb/geronimo-orb/src/test/java/
geronimo/trunk/sandbox/freeorb/pom.xml
Added: geronimo/trunk/sandbox/freeorb/LICENSE.txt
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/LICENSE.txt?rev=329036&view=auto
==============================================================================
--- geronimo/trunk/sandbox/freeorb/LICENSE.txt (added)
+++ geronimo/trunk/sandbox/freeorb/LICENSE.txt Thu Oct 27 19:00:06 2005
@@ -0,0 +1,203 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
Added: geronimo/trunk/sandbox/freeorb/geronimo-orb/pom.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/pom.xml?rev=329036&view=auto
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/pom.xml (added)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/pom.xml Thu Oct 27 19:00:06 2005
@@ -0,0 +1,52 @@
+<project>
+
+ <parent>
+ <groupId>org.apache.geronimo</groupId>
+ <artifactId>root</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.geronimo</groupId>
+ <artifactId>geronimo-orb</artifactId>
+ <name>Geronimo :: CORBA ORB</name>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>jar</packaging>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>concurrent</groupId>
+ <artifactId>concurrent</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+
+ </dependencies>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-clover-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-pmd-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-project-info-reports-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </reporting>
+
+</project>
Added: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/AbstractORB.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/AbstractORB.java?rev=329036&view=auto
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/AbstractORB.java (added)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/AbstractORB.java Thu Oct 27 19:00:06 2005
@@ -0,0 +1,208 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.corba;
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import javax.rmi.CORBA.Util;
+import javax.rmi.CORBA.ValueHandler;
+
+import org.omg.CORBA_2_3.ORB;
+import org.omg.IIOP.Version;
+
+import org.apache.geronimo.corba.dii.EnvironmentImpl;
+import org.apache.geronimo.corba.dii.ExceptionListImpl;
+import org.apache.geronimo.corba.dii.NamedValueImpl;
+import org.apache.geronimo.corba.io.CharConverter;
+import org.apache.geronimo.corba.io.GIOPVersion;
+
+
+public abstract class AbstractORB extends ORB {
+
+ /**
+ * Public no-arg constructor
+ */
+ public AbstractORB() {
+ }
+
+ public org.omg.CORBA.NamedValue create_named_value(String name,
+ org.omg.CORBA.Any value, int flags)
+ {
+ return new NamedValueImpl(name, value, flags);
+ }
+
+ public org.omg.CORBA.ExceptionList create_exception_list() {
+ return new ExceptionListImpl();
+ }
+
+ public org.omg.CORBA.Environment create_environment() {
+ return new EnvironmentImpl();
+ }
+
+
+ final public org.omg.CORBA.TypeCode create_struct_tc(String id,
+ String name, org.omg.CORBA.StructMember[] members)
+ {
+ return TypeCodeUtil.create_struct_tc(id, name, members);
+ }
+
+ final public org.omg.CORBA.TypeCode create_union_tc(String id, String name,
+ org.omg.CORBA.TypeCode discriminator_type,
+ org.omg.CORBA.UnionMember[] members)
+ {
+ return TypeCodeUtil.create_union_tc(id, name, discriminator_type,
+ members);
+ }
+
+ final public org.omg.CORBA.TypeCode create_enum_tc(String id, String name,
+ String[] members)
+ {
+ return TypeCodeUtil.create_enum_tc(id, name, members);
+ }
+
+ final public org.omg.CORBA.TypeCode create_alias_tc(String id, String name,
+ org.omg.CORBA.TypeCode original_type)
+ {
+ return TypeCodeUtil.create_alias_tc(id, name, original_type);
+ }
+
+ final public org.omg.CORBA.TypeCode create_exception_tc(String id,
+ String name, org.omg.CORBA.StructMember[] members)
+ {
+ return TypeCodeUtil.create_exception_tc(id, name, members);
+ }
+
+ final public org.omg.CORBA.TypeCode create_interface_tc(String id,
+ String name)
+ {
+ return TypeCodeUtil.create_interface_tc(id, name);
+ }
+
+ final public org.omg.CORBA.TypeCode create_string_tc(int bound) {
+ return TypeCodeUtil.create_string_tc(bound);
+ }
+
+ final public org.omg.CORBA.TypeCode create_wstring_tc(int bound) {
+ return TypeCodeUtil.create_wstring_tc(bound);
+ }
+
+ final public org.omg.CORBA.TypeCode create_fixed_tc(short digits,
+ short scale)
+ {
+ return TypeCodeUtil.create_fixed_tc(digits, scale);
+ }
+
+ final public org.omg.CORBA.TypeCode create_sequence_tc(int bound,
+ org.omg.CORBA.TypeCode element_type)
+ {
+ return TypeCodeUtil.create_sequence_tc(bound, element_type);
+ }
+
+ /**
+ * @deprecated
+ */
+ final public org.omg.CORBA.TypeCode create_recursive_sequence_tc(int bound,
+ int offset)
+ {
+ return TypeCodeUtil.create_recursive_sequence_tc(bound, offset);
+ }
+
+ final public org.omg.CORBA.TypeCode create_array_tc(int length,
+ org.omg.CORBA.TypeCode element_type)
+ {
+ return TypeCodeUtil.create_array_tc(length, element_type);
+ }
+
+ final public org.omg.CORBA.TypeCode create_value_tc(String id, String name,
+ short type_modifier, org.omg.CORBA.TypeCode concrete_base,
+ org.omg.CORBA.ValueMember[] members)
+ {
+ return TypeCodeUtil.create_value_tc(id, name, type_modifier,
+ concrete_base, members);
+ }
+
+ final public org.omg.CORBA.TypeCode create_value_box_tc(String id,
+ String name, org.omg.CORBA.TypeCode boxed_type)
+ {
+ return TypeCodeUtil.create_value_box_tc(id, name, boxed_type);
+ }
+
+ final public org.omg.CORBA.TypeCode create_native_tc(String id, String name) {
+ return TypeCodeUtil.create_native_tc(id, name);
+ }
+
+ final public org.omg.CORBA.TypeCode create_recursive_tc(String id) {
+ return TypeCodeUtil.create_recursive_tc(id);
+ }
+
+ final public org.omg.CORBA.TypeCode create_abstract_interface_tc(String id,
+ String name)
+ {
+ return TypeCodeUtil.create_abstract_interface_tc(id, name);
+ }
+
+ final public org.omg.CORBA.TypeCode get_primitive_tc(
+ org.omg.CORBA.TCKind kind)
+ {
+ return TypeCodeUtil.get_primitive_tc(kind);
+ }
+
+
+ public org.omg.CORBA.Any create_any() {
+ return new org.freeorb.AnyImpl(this);
+ }
+
+ public GIOPVersion getGIOPVersion() {
+ return GIOPVersion.V1_2;
+ }
+
+ public Version getIIOPVersion() {
+ GIOPVersion v = getGIOPVersion();
+ return new Version((byte) v.major, (byte) v.minor);
+ }
+
+ public CharConverter get_char_converter(GIOPVersion version) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public CharConverter get_wchar_converter(GIOPVersion version) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ private static final DNSCache DNS_CACHE = new DNSCache();
+
+ public final InetAddress getAddress(String host) throws UnknownHostException {
+ return DNS_CACHE.getAddress(host);
+ }
+
+ public void fatal(String string) {
+ // TODO Auto-generated method stub
+
+ }
+
+ private static ValueHandler valueHandler;
+
+ public javax.rmi.CORBA.ValueHandler getValueHandler() {
+ if (valueHandler == null) {
+ valueHandler = Util.createValueHandler();
+ }
+ return valueHandler;
+ }
+
+}
Added: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/AnyImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/AnyImpl.java?rev=329036&view=auto
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/AnyImpl.java (added)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/AnyImpl.java Thu Oct 27 19:00:06 2005
@@ -0,0 +1,752 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.corba;
+
+import java.io.IOException;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.NO_IMPLEMENT;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+
+import org.apache.geronimo.corba.TypeCodeImpl.EquivalenceContext;
+
+
+public class AnyImpl extends org.omg.CORBA.Any {
+
+ transient AbstractORB orb;
+
+ org.omg.CORBA.TypeCode type;
+
+ java.lang.Object _value;
+
+ org.omg.CORBA.portable.OutputStream _out;
+
+ Object getValue() {
+ if (_value == null) {
+
+ if (_out != null) {
+ read_value(_out.create_input_stream(), type);
+ _out = null;
+ }
+ }
+
+ return _value;
+ }
+
+ void setValue(Object value) {
+ _value = value;
+ _out = null;
+ }
+
+ void setOut(org.omg.CORBA.portable.OutputStream out) {
+ _value = null;
+ _out = out;
+ }
+
+ org.omg.CORBA.ORB __get_orb() {
+ if (orb == null) {
+ orb = new SingletonORB();
+ }
+
+ return orb;
+ }
+
+ AnyImpl() {
+ }
+
+ public AnyImpl(AbstractORB orb) {
+ this();
+ this.orb = orb;
+ set_primitive(TCKind.tk_null);
+ }
+
+ public String toString() {
+ return "Any{type=" + type + ", value=" + getValue() + "}";
+ }
+
+ public TypeCode type() {
+ return type;
+ }
+
+ public void type(TypeCode tc) {
+ type = tc;
+ _value = null;
+ }
+
+ private void set_primitive(TCKind kind) {
+ type = TypeCodeUtil.get_primitive_tc(kind);
+ }
+
+ private void check_primitive(TCKind kind, boolean nullOK) {
+ if (type.kind().value() != kind.value())
+ throw new org.omg.CORBA.BAD_OPERATION("wrong kind");
+ if (!nullOK && getValue() == null)
+ throw new org.omg.CORBA.BAD_OPERATION("value is null");
+ }
+
+ public void read_value(org.omg.CORBA.portable.InputStream in,
+ org.omg.CORBA.TypeCode tc)
+ {
+
+ type = tc;
+ int kind = tc.kind().value();
+
+ if (_value != null
+ && _value instanceof org.omg.CORBA.portable.Streamable
+ && kind != TCKind._tk_value && kind != TCKind._tk_value_box
+ && kind != TCKind._tk_abstract_interface)
+ {
+ ((org.omg.CORBA.portable.Streamable) _value)._read(in);
+ return;
+ }
+
+ switch (kind) {
+ case TCKind._tk_null:
+ case TCKind._tk_void:
+ setValue(null);
+ return;
+
+ case TCKind._tk_short:
+ insert_short(in.read_short());
+ return;
+
+ case TCKind._tk_long:
+ insert_long(in.read_long());
+ return;
+
+ case TCKind._tk_longlong:
+ insert_longlong(in.read_longlong());
+ return;
+
+ case TCKind._tk_ushort:
+ insert_ushort(in.read_ushort());
+ return;
+
+ case TCKind._tk_ulong:
+ insert_ulong(in.read_ulong());
+ return;
+
+ case TCKind._tk_ulonglong:
+ insert_ulonglong(in.read_ulonglong());
+ return;
+
+ case TCKind._tk_float:
+ insert_float(in.read_float());
+ return;
+
+ case TCKind._tk_double:
+ insert_double(in.read_double());
+ return;
+
+ case TCKind._tk_boolean:
+ insert_boolean(in.read_boolean());
+ return;
+
+ case TCKind._tk_char:
+ insert_char(in.read_char());
+ return;
+
+ case TCKind._tk_wchar:
+ insert_wchar(in.read_wchar());
+ return;
+
+ case TCKind._tk_octet:
+ insert_octet(in.read_octet());
+ return;
+
+ case TCKind._tk_any:
+ insert_any(in.read_any());
+ return;
+
+ case TCKind._tk_TypeCode:
+ insert_TypeCode(in.read_TypeCode());
+ return;
+
+ case TCKind._tk_objref:
+ insert_Object(in.read_Object());
+ return;
+
+ case TCKind._tk_union:
+ case TCKind._tk_array:
+ throw new org.omg.CORBA.NO_IMPLEMENT();
+
+ case TCKind._tk_except: {
+ in.read_string();
+ }
+ // fall through
+
+ case TCKind._tk_struct: {
+ try {
+ int count = tc.member_count();
+ AnyImpl[] valuearr = new AnyImpl[count];
+ for (int i = 0; i < count; i++) {
+ TypeCode elem_tc = tc.member_type(i);
+ valuearr[i] = new AnyImpl(orb);
+ valuearr[i].read_value(in, elem_tc);
+ }
+ setValue(valuearr);
+
+ }
+ catch (org.omg.CORBA.TypeCodePackage.BadKind ex) {
+ throw new org.omg.CORBA.BAD_PARAM("not struct?");
+
+ }
+ catch (org.omg.CORBA.TypeCodePackage.Bounds ex) {
+ throw new org.omg.CORBA.BAD_PARAM("concurrent mod");
+ }
+ return;
+ }
+
+ case TCKind._tk_sequence: {
+ int len = in.read_ulong();
+ TypeCode content = null;
+ try {
+ content = tc.content_type();
+ }
+ catch (org.omg.CORBA.TypeCodePackage.BadKind ex) {
+ throw new org.omg.CORBA.BAD_PARAM("not sequence?");
+ }
+
+ AnyImpl[] valuearr = new AnyImpl[len];
+ for (int i = 0; i < len; i++) {
+ valuearr[i] = new AnyImpl(orb);
+ valuearr[i].read_value(in, content);
+ }
+
+ setValue(valuearr);
+ return;
+ }
+
+ case TCKind._tk_value:
+ case TCKind._tk_value_box:
+ insert_Value(((org.omg.CORBA_2_3.portable.InputStream) in)
+ .read_value(), tc);
+ return;
+
+ case TCKind._tk_abstract_interface:
+ type = tc;
+ setValue(((org.omg.CORBA_2_3.portable.InputStream) in)
+ .read_abstract_interface());
+ return;
+
+ case TCKind._tk_enum:
+ insert_ulong(in.read_ulong());
+ type = tc;
+ return;
+
+ case TCKind._tk_string:
+ insert_string(in.read_string());
+ type = tc;
+ return;
+
+ case TCKind._tk_wstring:
+ insert_wstring(in.read_wstring());
+ type = tc;
+ return;
+
+ case TCKind._tk_alias:
+ try {
+ read_value(in, tc.content_type());
+ type = tc;
+ }
+ catch (org.omg.CORBA.TypeCodePackage.BadKind ex) {
+ throw new org.omg.CORBA.INTERNAL("not alias?");
+ }
+ return;
+
+ default:
+ throw new org.omg.CORBA.NO_IMPLEMENT(tc.toString());
+ }
+ }
+
+ public void write_value(org.omg.CORBA.portable.OutputStream out) {
+ int kind = type.kind().value();
+
+ if (_value != null
+ && _value instanceof org.omg.CORBA.portable.Streamable
+ && kind != TCKind._tk_value && kind != TCKind._tk_value_box
+ && kind != TCKind._tk_abstract_interface)
+ {
+ ((org.omg.CORBA.portable.Streamable) _value)._write(out);
+ return;
+ }
+
+ TypeCode tc = type;
+ while (kind == TCKind._tk_alias) {
+ try {
+ tc = tc.content_type();
+ kind = tc.kind().value();
+ }
+ catch (org.omg.CORBA.TypeCodePackage.BadKind ex) {
+ throw new org.omg.CORBA.INTERNAL("not alias");
+ }
+ }
+
+ switch (kind) {
+ case TCKind._tk_null:
+ case TCKind._tk_void:
+ return;
+
+ case TCKind._tk_short:
+ out.write_short(extract_short());
+ return;
+
+ case TCKind._tk_long:
+ out.write_long(extract_long());
+ return;
+
+ case TCKind._tk_longlong:
+ out.write_longlong(extract_longlong());
+ return;
+
+ case TCKind._tk_ushort:
+ out.write_ushort(extract_ushort());
+ return;
+
+ case TCKind._tk_ulong:
+ out.write_ulong(extract_ulong());
+ return;
+
+ case TCKind._tk_ulonglong:
+ out.write_ulonglong(extract_ulonglong());
+ return;
+
+ case TCKind._tk_float:
+ out.write_float(extract_float());
+ return;
+
+ case TCKind._tk_double:
+ out.write_double(extract_double());
+ return;
+
+ case TCKind._tk_boolean:
+ out.write_boolean(extract_boolean());
+ return;
+
+ case TCKind._tk_char:
+ out.write_char(extract_char());
+ return;
+
+ case TCKind._tk_wchar:
+ out.write_wchar(extract_wchar());
+ return;
+
+ case TCKind._tk_octet:
+ out.write_octet(extract_octet());
+ return;
+
+ case TCKind._tk_any:
+ out.write_any(extract_any());
+ return;
+
+ case TCKind._tk_TypeCode:
+ out.write_TypeCode(extract_TypeCode());
+ return;
+
+ case TCKind._tk_objref:
+ out.write_Object(extract_Object());
+ return;
+
+ case TCKind._tk_union:
+ case TCKind._tk_array:
+ throw new org.omg.CORBA.NO_IMPLEMENT();
+
+ case TCKind._tk_sequence: {
+ AnyImpl[] valuearr = (AnyImpl[]) getValue();
+ out.write_ulong(valuearr.length);
+ }
+ // fall thorugh
+
+ case TCKind._tk_struct: {
+ AnyImpl[] valuearr = (AnyImpl[]) getValue();
+ int count = valuearr.length;
+ for (int i = 0; i < count; i++) {
+ valuearr[i].write_value(out);
+ }
+ return;
+ }
+
+ case TCKind._tk_except: {
+ try {
+ out.write_string(tc.id());
+ }
+ catch (org.omg.CORBA.TypeCodePackage.BadKind ex) {
+ throw new org.omg.CORBA.BAD_PARAM("not exception?");
+ }
+
+ AnyImpl[] valuearr = (AnyImpl[]) getValue();
+ int count = valuearr.length;
+
+ for (int i = 0; i < count; i++) {
+ valuearr[i].write_value(out);
+ }
+ return;
+ }
+
+ case TCKind._tk_value:
+ case TCKind._tk_value_box:
+ ((org.omg.CORBA_2_3.portable.OutputStream) out)
+ .write_value((java.io.Serializable) getValue());
+ return;
+
+ case TCKind._tk_abstract_interface:
+ ((org.omg.CORBA_2_3.portable.OutputStream) out)
+ .write_abstract_interface(getValue());
+ return;
+
+ case TCKind._tk_enum:
+ out.write_ulong(((Integer) getValue()).intValue());
+ return;
+
+ case TCKind._tk_string:
+ out.write_string(extract_string());
+ return;
+
+ case TCKind._tk_wstring:
+ out.write_wstring(extract_wstring());
+ return;
+
+ default:
+ throw new org.omg.CORBA.INTERNAL("unexpected TypeCode");
+ }
+ }
+
+ /**
+ * @deprecated
+ */
+ public void insert_Principal(org.omg.CORBA.Principal p) {
+ set_primitive(TCKind.tk_Principal);
+ setValue(p);
+ }
+
+ /**
+ * @deprecated
+ */
+ public org.omg.CORBA.Principal extract_Principal() {
+ check_primitive(TCKind.tk_Principal, false);
+ return (org.omg.CORBA.Principal) getValue();
+ }
+
+ public void insert_TypeCode(org.omg.CORBA.TypeCode tc) {
+ set_primitive(TCKind.tk_TypeCode);
+ setValue(tc);
+ }
+
+ public org.omg.CORBA.TypeCode extract_TypeCode() {
+ check_primitive(TCKind.tk_TypeCode, false);
+ return (TypeCode) getValue();
+ }
+
+ public void insert_Object(org.omg.CORBA.Object o, org.omg.CORBA.TypeCode tc) {
+ type = tc;
+ setValue(o);
+ }
+
+ public void insert_Object(org.omg.CORBA.Object o) {
+ insert_Object(o, TypeCodeUtil.get_primitive_tc(TCKind.tk_objref));
+ }
+
+ public org.omg.CORBA.Object extract_Object() {
+ check_primitive(TCKind.tk_objref, true);
+ return (org.omg.CORBA.Object) getValue();
+ }
+
+ public void insert_wstring(String v) {
+ set_primitive(TCKind.tk_wstring);
+ setValue(v);
+ }
+
+ public String extract_wstring() {
+ check_primitive(TCKind.tk_wstring, true);
+ return (String) getValue();
+ }
+
+ public void insert_string(String v) {
+ set_primitive(TCKind.tk_string);
+ setValue(v);
+ }
+
+ public String extract_string() {
+ check_primitive(TCKind.tk_string, true);
+ return (String) getValue();
+ }
+
+ public void insert_short(short v) {
+ set_primitive(TCKind.tk_short);
+ setValue(new Short(v));
+ }
+
+ public short extract_short() {
+ check_primitive(TCKind.tk_short, false);
+ return ((Short) getValue()).shortValue();
+ }
+
+ public void insert_ushort(short v) {
+ set_primitive(TCKind.tk_ushort);
+ setValue(new Short(v));
+ }
+
+ public short extract_ushort() {
+ check_primitive(TCKind.tk_ushort, false);
+ return ((Short) getValue()).shortValue();
+ }
+
+ public void insert_any(org.omg.CORBA.Any v) {
+ set_primitive(TCKind.tk_any);
+ setValue(v);
+ }
+
+ public org.omg.CORBA.Any extract_any() {
+ check_primitive(TCKind.tk_any, false);
+ return (AnyImpl) getValue();
+ }
+
+ public void insert_wchar(char v) {
+ set_primitive(TCKind.tk_wchar);
+ setValue(new Character(v));
+ }
+
+ public char extract_wchar() {
+ check_primitive(TCKind.tk_wchar, false);
+ return ((Character) getValue()).charValue();
+ }
+
+ public void insert_char(char v) {
+ set_primitive(TCKind.tk_char);
+ setValue(new Character(v));
+ }
+
+ public char extract_char() {
+ check_primitive(TCKind.tk_char, false);
+ return ((Character) getValue()).charValue();
+ }
+
+ public void insert_octet(byte v) {
+ set_primitive(TCKind.tk_octet);
+ setValue(new Byte(v));
+ }
+
+ public byte extract_octet() {
+ check_primitive(TCKind.tk_octet, false);
+ return ((Byte) getValue()).byteValue();
+ }
+
+ public void insert_boolean(boolean v) {
+ set_primitive(TCKind.tk_boolean);
+ setValue(new Boolean(v));
+ }
+
+ public boolean extract_boolean() {
+ check_primitive(TCKind.tk_boolean, false);
+ return ((Boolean) getValue()).booleanValue();
+ }
+
+ public void insert_double(double v) {
+ set_primitive(TCKind.tk_double);
+ setValue(new Double(v));
+ }
+
+ public double extract_double() {
+ check_primitive(TCKind.tk_double, false);
+ return ((Double) getValue()).doubleValue();
+ }
+
+ public void insert_float(float v) {
+ set_primitive(TCKind.tk_float);
+ setValue(new Float(v));
+ }
+
+ public float extract_float() {
+ check_primitive(TCKind.tk_float, false);
+ return ((Float) getValue()).floatValue();
+ }
+
+ public void insert_long(int v) {
+ set_primitive(TCKind.tk_long);
+ setValue(new Integer(v));
+ }
+
+ public int extract_long() {
+ check_primitive(TCKind.tk_long, false);
+ return ((Integer) getValue()).intValue();
+ }
+
+ public void insert_ulong(int v) {
+ set_primitive(TCKind.tk_ulong);
+ setValue(new Integer(v));
+ }
+
+ public int extract_ulong() {
+ check_primitive(TCKind.tk_ulong, false);
+ return ((Integer) getValue()).intValue();
+ }
+
+ public void insert_longlong(long v) {
+ set_primitive(TCKind.tk_longlong);
+ setValue(new Long(v));
+ }
+
+ public long extract_longlong() {
+ check_primitive(TCKind.tk_longlong, false);
+ return ((Number) getValue()).longValue();
+ }
+
+ public void insert_ulonglong(long v) {
+ set_primitive(TCKind.tk_ulonglong);
+ setValue(new Long(v));
+ }
+
+ public long extract_ulonglong() {
+ check_primitive(TCKind.tk_ulonglong, false);
+ return ((Long) getValue()).longValue();
+ }
+
+ public void insert_Streamable(org.omg.CORBA.portable.Streamable val) {
+ type = val._type();
+ setValue(val);
+ }
+
+ public void insert_Value(java.io.Serializable value) {
+ insert_Value(value, TypeCodeUtil.get_primitive_tc(TCKind.tk_value));
+ }
+
+ public void insert_Value(java.io.Serializable val, TypeCode tc) {
+ type = tc;
+ setValue(val);
+ }
+
+ public java.io.Serializable extract_Value() {
+ TCKind kind = type.kind();
+
+ if (kind == TCKind.tk_value || kind == TCKind.tk_value_box
+ || kind == TCKind.tk_abstract_interface)
+ {
+ return (java.io.Serializable) getValue();
+ } else {
+ throw new org.omg.CORBA.BAD_OPERATION("TypeCode is not value");
+ }
+ }
+
+ public org.omg.CORBA.portable.InputStream create_input_stream() {
+ if (_out != null) {
+ return _out.create_input_stream();
+
+ } else {
+ // org.omg.CORBA.portable.OutputStream out = create_output_stream
+ // ();
+
+ org.omg.CORBA.portable.OutputStream out;
+
+ if (orb instanceof ORB) {
+ out = __get_orb().create_output_stream();
+ } else {
+ // out = new DynamicOutputStream();
+ throw new NO_IMPLEMENT();
+ }
+
+ write_value(out);
+ return out.create_input_stream();
+ }
+ }
+
+ public org.omg.CORBA.portable.OutputStream create_output_stream() {
+ org.omg.CORBA.portable.OutputStream out;
+
+ if (orb instanceof ORB) {
+ out = __get_orb().create_output_stream();
+ } else {
+ // out = new DynamicOutputStream();
+ throw new NO_IMPLEMENT();
+ }
+
+ setOut(out);
+
+ return out;
+ }
+
+ /**
+ * compare this Any to another for equality
+ */
+ public boolean equal(org.omg.CORBA.Any other) {
+ if (other == this) {
+ return true;
+ }
+
+ if (other == null) {
+ return false;
+ }
+
+ return equal(other, new EquivalenceContext());
+ }
+
+ boolean equal(Any other, EquivalenceContext ctx) {
+
+ if (other == this) {
+ return true;
+ }
+
+ if (other == null) {
+ return false;
+ }
+
+ if (type != other.type()) {
+
+ if (type instanceof TypeCodeImpl) {
+ if (!((TypeCodeImpl) type).equal(other.type(), ctx)) {
+ return false;
+ }
+ } else if (other.type() instanceof TypeCodeImpl) {
+ if (!((TypeCodeImpl) other.type()).equal(type, ctx)) {
+ return false;
+ }
+ } else {
+ if (!type.equal(other.type())) {
+ return false;
+ }
+ }
+
+ }
+
+ InputStream b1 = this.create_input_stream();
+ InputStream b2 = other.create_input_stream();
+
+ int available1 = 0;
+ int available2 = 0;
+ try {
+ available1 = b1.available();
+ available2 = b2.available();
+ }
+ catch (IOException e) {
+ return false;
+ }
+
+ if (available1 != available2) {
+ return false;
+ }
+
+ byte[] data1 = new byte[available1];
+ b1.read_octet_array(data1, 0, data1.length);
+
+ byte[] data2 = new byte[available2];
+ b2.read_octet_array(data2, 0, data2.length);
+
+ return java.util.Arrays.equals(data1, data2);
+ }
+
+}
Added: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ClientDelegate.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ClientDelegate.java?rev=329036&view=auto
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ClientDelegate.java (added)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ClientDelegate.java Thu Oct 27 19:00:06 2005
@@ -0,0 +1,184 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.corba;
+
+import org.omg.CORBA.Context;
+import org.omg.CORBA.ContextList;
+import org.omg.CORBA.ExceptionList;
+import org.omg.CORBA.NVList;
+import org.omg.CORBA.NamedValue;
+import org.omg.CORBA.Object;
+import org.omg.CORBA.Request;
+import org.omg.CORBA.portable.ApplicationException;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.RemarshalException;
+import org.omg.CORBA_2_3.portable.Delegate;
+import org.omg.IOP.IOR;
+
+import org.apache.geronimo.corba.ior.InternalIOR;
+
+
+public class ClientDelegate extends Delegate {
+
+ private final ORB orb;
+ private InternalIOR ior;
+
+ private InvocationProfileSelector profileManager;
+
+ public ClientDelegate(InternalIOR ior) {
+ this.ior = ior;
+ this.orb = (ORB) ior.orb;
+ }
+
+ ClientDelegate(ORB orb, IOR ior) {
+ this(new InternalIOR(orb, ior));
+ }
+
+ //
+ //
+ //
+
+ public boolean is_local(org.omg.CORBA.Object self) {
+ // TODO: implement
+ return false;
+ }
+
+ public OutputStream request(org.omg.CORBA.Object self, String operation,
+ boolean responseExpected)
+ {
+
+
+ while (true) {
+
+ InvocationProfileSelector manager = getProfileSelector();
+
+ try {
+
+ // process client interceptor (pre-marshal) and write
+ // RequestHeader to output stream.
+
+ OutputStream result = manager.setupRequest(operation,
+ responseExpected);
+
+ return result;
+
+ }
+ catch (org.omg.PortableInterceptor.ForwardRequest ex) {
+
+ setIOR(InternalIOR.extract(ex.forward));
+
+ continue;
+
+ }
+
+ }
+ }
+
+ private void setIOR(InternalIOR ior) {
+ this.ior = ior;
+ this.profileManager = null;
+ }
+
+
+ private InvocationProfileSelector getProfileSelector() {
+ if (this.profileManager == null) {
+ this.profileManager = orb.createInvocationProfileSelector(this);
+ }
+ return profileManager;
+ }
+
+ public InputStream invoke(org.omg.CORBA.Object self, OutputStream output)
+ throws ApplicationException, RemarshalException
+ {
+ // TODO: implement
+ throw new org.omg.CORBA.NO_IMPLEMENT();
+ }
+
+ public void releaseReply(org.omg.CORBA.Object self, InputStream input) {
+ // TODO: implement
+ throw new org.omg.CORBA.NO_IMPLEMENT();
+ }
+
+ public Object get_interface_def(Object self) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object duplicate(Object obj) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void release(Object obj) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public boolean is_a(Object obj, String repository_id) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean non_existent(Object obj) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean is_equivalent(Object obj, Object other) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public int hash(Object obj, int max) {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public Request request(Object obj, String operation) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Request create_request(Object obj, Context ctx, String operation,
+ NVList arg_list, NamedValue result)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Request create_request(Object obj, Context ctx, String operation,
+ NVList arg_list, NamedValue result, ExceptionList exclist,
+ ContextList ctxlist)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public InternalIOR getInternalIOR() {
+ return ior;
+ }
+
+ public ORB getORB() {
+ return orb;
+ }
+
+ public InternalIOR getIOR() {
+ return ior;
+ }
+
+}
Added: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ClientInvocation.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ClientInvocation.java?rev=329036&view=auto
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ClientInvocation.java (added)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ClientInvocation.java Thu Oct 27 19:00:06 2005
@@ -0,0 +1,60 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.corba;
+
+import java.util.List;
+
+import org.omg.PortableInterceptor.ForwardRequest;
+
+import org.apache.geronimo.corba.giop.GIOPOutputStream;
+
+
+public class ClientInvocation implements Invocation {
+
+ private final InvocationProfileSelector manager;
+ private final String operation;
+ private final boolean responseExpected;
+
+ /** */
+ private final InvocationProfile profile;
+
+ private List requestServiceContextList;
+
+ public ClientInvocation(InvocationProfileSelector manager,
+ String operation,
+ boolean responseExpected,
+ InvocationProfile profile
+ )
+ {
+ this.manager = manager;
+ this.operation = operation;
+ this.responseExpected = responseExpected;
+ this.profile = profile;
+ }
+
+ ClientDelegate getDelegate() {
+ return manager.getDelegate();
+ }
+
+
+ public GIOPOutputStream startRequest()
+ throws ForwardRequest
+ {
+ return profile.startRequest();
+ }
+
+}
Added: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ConnectionManager.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ConnectionManager.java?rev=329036&view=auto
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ConnectionManager.java (added)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ConnectionManager.java Thu Oct 27 19:00:06 2005
@@ -0,0 +1,26 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.corba;
+
+import org.apache.geronimo.corba.ior.InternalIOR;
+
+
+public interface ConnectionManager {
+
+ InvocationProfile[] getInvocationProfiles(InternalIOR ior);
+
+}
Added: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/DNSCache.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/DNSCache.java?rev=329036&view=auto
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/DNSCache.java (added)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/DNSCache.java Thu Oct 27 19:00:06 2005
@@ -0,0 +1,30 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.corba;
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
+
+class DNSCache {
+
+ public InetAddress getAddress(String host) throws UnknownHostException {
+ // TODO: implement cache
+ return InetAddress.getByName(host);
+ }
+
+}
Added: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/Invocation.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/Invocation.java?rev=329036&view=auto
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/Invocation.java (added)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/Invocation.java Thu Oct 27 19:00:06 2005
@@ -0,0 +1,21 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.corba;
+
+public interface Invocation {
+
+}
Added: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/InvocationProfile.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/InvocationProfile.java?rev=329036&view=auto
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/InvocationProfile.java (added)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/InvocationProfile.java Thu Oct 27 19:00:06 2005
@@ -0,0 +1,26 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.corba;
+
+import org.apache.geronimo.corba.giop.GIOPOutputStream;
+
+
+public interface InvocationProfile {
+
+ GIOPOutputStream startRequest();
+
+}
Added: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/InvocationProfileSelector.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/InvocationProfileSelector.java?rev=329036&view=auto
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/InvocationProfileSelector.java (added)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/InvocationProfileSelector.java Thu Oct 27 19:00:06 2005
@@ -0,0 +1,96 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.corba;
+
+import org.omg.CORBA.NO_RESOURCES;
+import org.omg.CORBA.portable.OutputStream;
+
+import org.apache.geronimo.corba.giop.GIOPOutputStream;
+
+
+public class InvocationProfileSelector {
+
+ private ClientDelegate delegate;
+
+ private InvocationProfile[] profiles;
+
+ private int currentProfile;
+
+ private final ORB orb;
+
+ public InvocationProfileSelector(ORB orb, ClientDelegate delegate) {
+ this.orb = orb;
+ this.delegate = delegate;
+ this.profiles = getProfileList();
+ }
+
+ private InvocationProfile[] getProfileList() {
+ return getORB().getInvocationProfiles(delegate.getIOR());
+ }
+
+ private ORB getORB() {
+ return orb;
+ }
+
+ public OutputStream setupRequest(String operation, boolean responseExpected)
+ throws org.omg.PortableInterceptor.ForwardRequest
+ {
+ while (true) {
+ ClientInvocation invocation = createClientInvcation(operation,
+ responseExpected);
+
+ try {
+
+ GIOPOutputStream out = invocation.startRequest();
+ return out;
+
+ }
+ catch (org.omg.PortableInterceptor.ForwardRequest ex) {
+ throw ex;
+
+ }
+ catch (RuntimeException ex) {
+
+ currentProfile++;
+
+ if (currentProfile >= profiles.length) {
+ throw ex;
+ }
+
+ }
+ }
+
+ }
+
+ private ClientInvocation createClientInvcation(String operation,
+ boolean responseExpected)
+ {
+
+ if (currentProfile >= profiles.length) {
+ throw new NO_RESOURCES();
+ }
+
+ InvocationProfile profile = profiles[currentProfile];
+
+ return new ClientInvocation(this, operation, responseExpected, profile);
+ }
+
+ public ClientDelegate getDelegate() {
+ return delegate;
+ }
+
+}
Added: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ORB.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ORB.java?rev=329036&view=auto
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ORB.java (added)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ORB.java Thu Oct 27 19:00:06 2005
@@ -0,0 +1,133 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.corba;
+
+import java.applet.Applet;
+import java.util.Properties;
+
+import org.omg.CORBA.Context;
+import org.omg.CORBA.ContextList;
+import org.omg.CORBA.NO_IMPLEMENT;
+import org.omg.CORBA.NVList;
+import org.omg.CORBA.ORBPackage.InvalidName;
+import org.omg.CORBA.Object;
+import org.omg.CORBA.Request;
+import org.omg.CORBA.WrongTransaction;
+import org.omg.CORBA.portable.OutputStream;
+
+import org.apache.geronimo.corba.dii.NVListImpl;
+import org.apache.geronimo.corba.io.DefaultConnectionManager;
+import org.apache.geronimo.corba.io.EncapsulationInputStream;
+import org.apache.geronimo.corba.io.InputStreamBase;
+import org.apache.geronimo.corba.ior.InternalIOR;
+
+
+public class ORB extends AbstractORB {
+
+ private DefaultConnectionManager cm;
+
+ protected void set_parameters(String[] args, Properties props) {
+ // TODO Auto-generated method stub
+
+ }
+
+ protected void set_parameters(Applet app, Properties props) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public String[] list_initial_services() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object resolve_initial_references(String object_name)
+ throws InvalidName
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String object_to_string(Object obj) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object string_to_object(String str) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public NVList create_list(int count) {
+ return new NVListImpl(this, count);
+ }
+
+ public ContextList create_context_list() {
+ throw new NO_IMPLEMENT();
+ }
+
+ public Context get_default_context() {
+ throw new NO_IMPLEMENT();
+ }
+
+ public OutputStream create_output_stream() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void send_multiple_requests_oneway(Request[] req) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void send_multiple_requests_deferred(Request[] req) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public boolean poll_next_response() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public Request get_next_response() throws WrongTransaction {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public synchronized ConnectionManager getConnectionManager() {
+ if (cm == null) {
+ cm = new DefaultConnectionManager(this);
+ }
+ return cm;
+ }
+
+ public InvocationProfileSelector createInvocationProfileSelector(
+ ClientDelegate delegate)
+ {
+ return new InvocationProfileSelector(this, delegate);
+ }
+
+ public InvocationProfile[] getInvocationProfiles(InternalIOR ior) {
+ return getConnectionManager().getInvocationProfiles(ior);
+ }
+
+ public InputStreamBase getEncapsulationInputStream(byte[] component_data) {
+ return new EncapsulationInputStream(this, component_data);
+ }
+
+}
Added: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/PlainObject.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/PlainObject.java?rev=329036&view=auto
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/PlainObject.java (added)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/PlainObject.java Thu Oct 27 19:00:06 2005
@@ -0,0 +1,32 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.corba;
+
+import org.omg.CORBA_2_3.portable.ObjectImpl;
+
+
+public class PlainObject extends ObjectImpl {
+
+ ClientDelegate __get_delegate() {
+ return (ClientDelegate) _get_delegate();
+ }
+
+ public String[] _ids() {
+ return new String[]{__get_delegate().getIOR().getType()};
+ }
+
+}