geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r355821 [2/2] - in /geronimo/trunk/sandbox/freeorb/geronimo-orb: ./ src/main/java/org/apache/geronimo/corba/ src/main/java/org/apache/geronimo/corba/channel/ src/main/java/org/apache/geronimo/corba/giop/ src/main/java/org/apache/geronimo/co...
Date Sun, 11 Dec 2005 00:14:35 GMT
Modified: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/InternalServiceContext.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/InternalServiceContext.java?rev=355821&r1=355820&r2=355821&view=diff
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/InternalServiceContext.java
(original)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/InternalServiceContext.java
Sat Dec 10 16:14:16 2005
@@ -58,4 +58,9 @@
 		
 	}
 
+	public ServiceContext asServiceContext() {
+		// TODO: ensure encoded
+		return ctx;
+	}
+
 }

Modified: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/InternalServiceContextList.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/InternalServiceContextList.java?rev=355821&r1=355820&r2=355821&view=diff
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/InternalServiceContextList.java
(original)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/InternalServiceContextList.java
Sat Dec 10 16:14:16 2005
@@ -21,6 +21,7 @@
 
 import org.apache.geronimo.corba.io.InputStreamBase;
 import org.apache.geronimo.corba.io.OutputStreamBase;
+import org.omg.IOP.ServiceContext;
 
 
 public class InternalServiceContextList {
@@ -49,5 +50,20 @@
 		
 		return null;
 	}
+
+	public void add(InternalServiceContext service_context, boolean replace) {
+		
+		if (replace) {
+			for (int i = 0; i < scl.size(); i++) {
+				InternalServiceContext sc = (InternalServiceContext) scl.get(i);
+				if (sc.tag() == service_context.tag()) {
+					scl.set(i, service_context);
+				}
+			}
+		}
+
+		scl.add(service_context);
+	}
+
 
 }

Modified: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/MultiComponentProfile.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/MultiComponentProfile.java?rev=355821&r1=355820&r2=355821&view=diff
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/MultiComponentProfile.java
(original)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/MultiComponentProfile.java
Sat Dec 10 16:14:16 2005
@@ -41,7 +41,7 @@
 
 
     public static Profile read(AbstractORB orb, byte[] data) {
-
+    	
         EncapsulationInputStream ein2 = new EncapsulationInputStream(orb, data);
         MultiComponentProfile result = new MultiComponentProfile(orb, data);
         result.tagged_components = TaggedComponentSeqHelper.read(ein2);
@@ -52,7 +52,7 @@
         return TAG_MULTIPLE_COMPONENTS.value;
     }
 
-    int getComponentCount() {
+    public int getComponentCount() {
         if (tagged_components == null) {
             return 0;
         } else {

Modified: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/Profile.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/Profile.java?rev=355821&r1=355820&r2=355821&view=diff
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/Profile.java
(original)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/Profile.java
Sat Dec 10 16:14:16 2005
@@ -21,56 +21,70 @@
 import org.omg.IOP.TAG_INTERNET_IOP;
 import org.omg.IOP.TAG_MULTIPLE_COMPONENTS;
 import org.omg.IOP.TaggedComponent;
+import org.omg.IOP.TaggedProfile;
 
 import org.apache.geronimo.corba.AbstractORB;
+import org.apache.geronimo.corba.ORB;
+import org.apache.geronimo.corba.io.EncapsulationOutputStream;
+import org.apache.geronimo.corba.io.GIOPVersion;
 import org.apache.geronimo.corba.io.OutputStreamBase;
 
-
 public abstract class Profile extends TaggedValue {
 
-    public Profile() {
-    }
-
-    public void write_encapsulated_content(OutputStreamBase out) {
-    		byte[] bytes = get_encapsulation_bytes();
-    		if (bytes == null) {
-    			super.write_encapsulated_content(out);
-    		} else {
-    			out.write_octet_array(bytes, 0, bytes.length);
-    		}
-    }
-    
-    /**
-     * write content including tag
-     */
-    public void write(OutputStream out) {
-        out.write_long(tag());
-        OctetSeqHelper.write(out, get_encapsulation_bytes());
-    }
-
-    protected abstract byte[] get_encapsulation_bytes();
-
-    public static Profile read(AbstractORB orb, int tag, byte[] data) {
-
-        switch (tag) {
-            case TAG_INTERNET_IOP.value:
-                return IIOPProfile.read(orb, data);
-
-            case TAG_MULTIPLE_COMPONENTS.value:
-                return MultiComponentProfile.read(orb, data);
-
-            default:
-                return new UnknownProfile(tag, data);
-        }
-    }
-
-
-    abstract int getComponentCount();
-
-    public abstract int getTag(int idx);
-
-    public abstract TaggedComponent getTaggedComponent(int idx);
+	public Profile() {
+	}
 
-    public abstract Component getComponent(int idx);
+	public void write_encapsulated_content(OutputStreamBase out) {
+		byte[] bytes = get_encapsulation_bytes();
+		if (bytes == null) {
+			super.write_encapsulated_content(out);
+		} else {
+			out.write_octet_array(bytes, 0, bytes.length);
+		}
+	}
+
+	/**
+	 * write content including tag
+	 */
+	public void write(OutputStream out) {
+		out.write_long(tag());
+		OctetSeqHelper.write(out, get_encapsulation_bytes());
+	}
+
+	abstract protected byte[] get_encapsulation_bytes();
+
+	public static Profile read(AbstractORB orb, int tag, byte[] data) {
+
+		switch (tag) {
+		case TAG_INTERNET_IOP.value:
+			return IIOPProfile.read(orb, data);
+
+		case TAG_MULTIPLE_COMPONENTS.value:
+			return MultiComponentProfile.read(orb, data);
+
+		default:
+			return new UnknownProfile(tag, data);
+		}
+	}
+
+	public abstract int getComponentCount();
+
+	public abstract int getTag(int idx);
+
+	public abstract TaggedComponent getTaggedComponent(int idx);
+
+	public abstract Component getComponent(int idx);
+
+	public TaggedProfile asTaggedProfile(ORB orb) {
+		byte[] bytes = get_encapsulation_bytes();
+		if (bytes == null) {
+			EncapsulationOutputStream eos = new EncapsulationOutputStream(
+					orb, GIOPVersion.V1_0);
+			super.write_encapsulated_content(eos);
+			bytes = eos.getBytes();
+		}
+		TaggedProfile tp = new TaggedProfile(tag(), bytes);
+		return tp;
+	}
 
 }

Modified: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/TaggedValue.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/TaggedValue.java?rev=355821&r1=355820&r2=355821&view=diff
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/TaggedValue.java
(original)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/TaggedValue.java
Sat Dec 10 16:14:16 2005
@@ -42,7 +42,7 @@
     			return;
     		}
     		
-        EncapsulationOutputStream eo = new EncapsulationOutputStream(out.__orb());
+        EncapsulationOutputStream eo = new EncapsulationOutputStream(out.__orb(), out.getGIOPVersion());
         write_content(eo);
         try {
         	   out.write_long(eo.__stream_position());

Modified: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/UnknownProfile.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/UnknownProfile.java?rev=355821&r1=355820&r2=355821&view=diff
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/UnknownProfile.java
(original)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/ior/UnknownProfile.java
Sat Dec 10 16:14:16 2005
@@ -35,7 +35,7 @@
         return tag;
     }
 
-    int getComponentCount() {
+    public int getComponentCount() {
         return 0;
     }
 

Added: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/policy/PolicyFactoryManager.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/policy/PolicyFactoryManager.java?rev=355821&view=auto
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/policy/PolicyFactoryManager.java
(added)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/policy/PolicyFactoryManager.java
Sat Dec 10 16:14:16 2005
@@ -0,0 +1,34 @@
+/**
+ *
+ * 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.policy;
+
+import org.apache.geronimo.corba.ORB;
+import org.omg.PortableInterceptor.PolicyFactory;
+
+public class PolicyFactoryManager {
+
+	public PolicyFactoryManager(ORB orb) {
+		// TODO Auto-generated constructor stub
+	}
+
+	public void register_policy_factory(int type, PolicyFactory policy_factory) {
+		// TODO Auto-generated method stub
+		
+	}
+
+}

Modified: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/server/DefaultServerManager.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/server/DefaultServerManager.java?rev=355821&r1=355820&r2=355821&view=diff
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/server/DefaultServerManager.java
(original)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/server/DefaultServerManager.java
Sat Dec 10 16:14:16 2005
@@ -22,6 +22,7 @@
 import org.apache.geronimo.corba.ior.InternalIOR;
 import org.omg.CORBA.Policy;
 
+/** The ServerManager owns the RootPOA and manages the tree of POAs */
 public class DefaultServerManager implements ServerManager {
 
 	private final ORB orb;
@@ -30,6 +31,7 @@
 		this.orb = orb;
 	}
 
+	/** if IOR represents a local object (managed by a POA in this server), yield a ServantObject
*/
 	public ServantObject getServantObject(InternalIOR ior, Policy[] policies)
 			throws LocationForwardException {
 		// TODO Auto-generated method stub

Modified: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/server/ServantObject.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/server/ServantObject.java?rev=355821&r1=355820&r2=355821&view=diff
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/server/ServantObject.java
(original)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/server/ServantObject.java
Sat Dec 10 16:14:16 2005
@@ -18,7 +18,7 @@
 
 package org.apache.geronimo.corba.server;
 
-
+/** Implementation of ServantObject passed back to the local-case in a stub */
 public class ServantObject
     extends org.omg.CORBA.portable.ServantObject
 {

Added: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/server/ServerInvocation.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/server/ServerInvocation.java?rev=355821&view=auto
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/server/ServerInvocation.java
(added)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/server/ServerInvocation.java
Sat Dec 10 16:14:16 2005
@@ -0,0 +1,73 @@
+/**
+ *
+ * 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.server;
+
+import org.apache.geronimo.corba.Invocation;
+import org.apache.geronimo.corba.ORB;
+import org.apache.geronimo.corba.Policies;
+import org.apache.geronimo.corba.ior.InternalServiceContextList;
+
+/** reification of server-side invocation */
+public class ServerInvocation implements Invocation {
+
+	public String getOperation() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public int getRequestID() {
+		// TODO Auto-generated method stub
+		return 0;
+	}
+
+	public boolean responseExpected() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public short getSyncScope() {
+		// TODO Auto-generated method stub
+		return 0;
+	}
+
+	public boolean isResponseExpected() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public InternalServiceContextList getResponseServiceContextList(boolean create) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public InternalServiceContextList getRequestServiceContextList(boolean create) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public ORB getORB() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public Policies getPolicies() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+}

Modified: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/util/IntegerToObjectHashMap.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/util/IntegerToObjectHashMap.java?rev=355821&r1=355820&r2=355821&view=diff
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/util/IntegerToObjectHashMap.java
(original)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/util/IntegerToObjectHashMap.java
Sat Dec 10 16:14:16 2005
@@ -20,9 +20,8 @@
 
 
 /**
- * @author Kresten Krab Thorup (krab@trifork.com)
+ * @version $Revision: $ $Date: $
  */
-
 public class IntegerToObjectHashMap implements IntegerToObjectMap {
 
     public static final Object NO_VALUE = null;

Modified: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/util/IntegerToObjectMap.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/util/IntegerToObjectMap.java?rev=355821&r1=355820&r2=355821&view=diff
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/util/IntegerToObjectMap.java
(original)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/main/java/org/apache/geronimo/corba/util/IntegerToObjectMap.java
Sat Dec 10 16:14:16 2005
@@ -17,7 +17,7 @@
 package org.apache.geronimo.corba.util;
 
 /**
- * @author Kresten Krab Thorup (krab@trifork.com)
+ * @version $Revision: $ $Date: $
  */
 public interface IntegerToObjectMap {
 

Modified: geronimo/trunk/sandbox/freeorb/geronimo-orb/src/test/java/org/apache/geronimo/corba/test/G2SHelloWorldTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/freeorb/geronimo-orb/src/test/java/org/apache/geronimo/corba/test/G2SHelloWorldTest.java?rev=355821&r1=355820&r2=355821&view=diff
==============================================================================
--- geronimo/trunk/sandbox/freeorb/geronimo-orb/src/test/java/org/apache/geronimo/corba/test/G2SHelloWorldTest.java
(original)
+++ geronimo/trunk/sandbox/freeorb/geronimo-orb/src/test/java/org/apache/geronimo/corba/test/G2SHelloWorldTest.java
Sat Dec 10 16:14:16 2005
@@ -30,7 +30,7 @@
 			
 			props.setProperty(ORBClassKey, "org.apache.geronimo.corba.ORB");
 			props.setProperty(ORBSingletonClassKey, "org.apache.geronimo.corba.SingletonORB");
-			
+			props.setProperty("org.omg.PortableInterceptor.ORBInitializerClass." + ClientInterceptorInitializer.class.getName(),
"42");
 		}
 		return props;
 	}



Mime
View raw message