[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] FYI: New methods for org.omg.CORBA.LocalObject
From: |
Meskauskas Audrius |
Subject: |
[cp-patches] FYI: New methods for org.omg.CORBA.LocalObject |
Date: |
Fri, 14 Oct 2005 12:39:34 +0200 |
User-agent: |
Mozilla Thunderbird 1.0.2 (Windows/20050317) |
I add the missing methods for LocalObject. Sadly, java API 1.5 clearly
states that they
all MUST be non-functional stubs, so they are...
2005-10-14 Audrius Meskauskas <address@hidden>
* org/omg/CORBA/LocalObject.java (_get_interface, _invoke,
_is_local,
_orb, _releaseReply, _request, _servant_postinvoke,
_servant_preinvoke,
validate_connection: New methods.
Index: org/omg/CORBA/LocalObject.java
===================================================================
RCS file: /cvsroot/classpath/classpath/org/omg/CORBA/LocalObject.java,v
retrieving revision 1.2
diff -u -r1.2 LocalObject.java
--- org/omg/CORBA/LocalObject.java 2 Jul 2005 20:32:57 -0000 1.2
+++ org/omg/CORBA/LocalObject.java 14 Oct 2005 10:11:36 -0000
@@ -49,6 +49,13 @@
import org.omg.CORBA.Policy;
import org.omg.CORBA.Request;
import org.omg.CORBA.SetOverrideType;
+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.portable.ServantObject;
+
+import javax.rmi.CORBA.Util;
/**
* An object, formally implementing the CORBA address@hidden Object}, but
actually
@@ -141,6 +148,17 @@
*
* @throws NO_IMPLEMENT, always.
*/
+ public org.omg.CORBA.Object _get_interface()
+ {
+ throw new NO_IMPLEMENT(INAPPROPRIATE);
+ }
+
+ /**
+ * This method is not appropriate for the local objects and just
+ * throws an exception.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
public Policy _get_policy(int a_policy_type)
throws BAD_PARAM
{
@@ -229,6 +247,116 @@
public org.omg.CORBA.Object _set_policy_override(Policy[] policies,
SetOverrideType how
)
+ {
+ throw new NO_IMPLEMENT(INAPPROPRIATE);
+ }
+
+ /**
+ * This method is called from <code>rmic</code> generated stubs if the
+ * address@hidden Util#isLocal()}, called passing <code>this</code> as
parameter,
+ * returns true. If the method returns null, the requested method is then
+ * invoked on <code>this</code>. Else it is invoked on the returned object,
+ * casting it into the interface that the local object implements. In this
+ * case, the generated stub also later calls
+ * address@hidden _servant_postinvoke(ServantObject)}, passing that returned
target
+ * as parameter.
+ *
+ * @param operation the name of the method being invoked.
+ * @param expectedType the interface that the returned servant
+ * object must implement.
+ *
+ * @throws NO_IMPLEMENT always. If used, the method must be overridden.
+ */
+ public ServantObject _servant_preinvoke(String operation, Class expectedType)
+ {
+ throw new NO_IMPLEMENT(INAPPROPRIATE);
+ }
+
+
+ /**
+ * This method is called from <code>rmic</code> generated stubs if the
+ * address@hidden Util#isLocal()}, called passing <code>this</code> as
parameter,
+ * returns true, and the address@hidden #_servant_preinvoke} return non-null
object.
+ * The stub then invokes the requrested method on that returned object and
+ * later calls _servant_postinvoke, passing that returned target as
parameter.
+ *
+ * @param servant the object that has served as the invocation target for the
+ * current operation.
+ */
+ public void _servant_postinvoke(ServantObject servant)
+ {
+ }
+
+ /**
+ * Invokes the operation. This method takes the OutputStream that was
previously
+ * returned by a address@hidden _request()} and returns an InputStream which
+ * contains the reply. Up till jdk 1.5 inclusive this method is marked as
+ * unimplemented.
+ *
+ * @throws NO_IMPLEMENT always.
+ */
+ public InputStream _invoke(OutputStream output)
+ throws ApplicationException, RemarshalException
+ {
+ throw new NO_IMPLEMENT(INAPPROPRIATE);
+ }
+
+ /**
+ * While it may look that this should return true, the jdk 1.5 API states
+ * that it must throw NO_IMPLEMENT instead. The rmi stubs do not call this
+ * method to check if the object is local; they call address@hidden
Util#isLocal()}
+ * instead (passing <code>this</code> as parameter).
+ *
+ * @return never.
+ *
+ * @throws NO_IMPLEMENT always.
+ */
+ public boolean _is_local()
+ {
+ throw new NO_IMPLEMENT(INAPPROPRIATE);
+ }
+
+
+ /**
+ * This method is not appropriate for the local objects and just
+ * throws an exception.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public ORB _orb()
+ {
+ throw new NO_IMPLEMENT(INAPPROPRIATE);
+ }
+
+ /**
+ * This method is not appropriate for the local objects and just
+ * throws an exception.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public void _releaseReply(InputStream input)
+ {
+ throw new NO_IMPLEMENT(INAPPROPRIATE);
+ }
+
+ /**
+ * This method is not appropriate for the local objects and just
+ * throws an exception.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public OutputStream _request(String operation, boolean responseExpected)
+ {
+ throw new NO_IMPLEMENT(INAPPROPRIATE);
+ }
+
+ /**
+ * This method is not appropriate for the local objects and just
+ * throws an exception.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public boolean validate_connection()
{
throw new NO_IMPLEMENT(INAPPROPRIATE);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] FYI: New methods for org.omg.CORBA.LocalObject,
Meskauskas Audrius <=