summaryrefslogtreecommitdiff
path: root/org
diff options
context:
space:
mode:
authorAudrius Meskauskas <audriusa@Bioinformatics.org>2005-10-14 10:41:53 +0000
committerAudrius Meskauskas <audriusa@Bioinformatics.org>2005-10-14 10:41:53 +0000
commita96ecfeda0ed0c9d3d5735d70bf9d1b1c17c119c (patch)
treee982dd090e6791661c9029bcaa97958cd136c529 /org
parentae0b7103d019b3c2900e411bd630bdeb1966f384 (diff)
downloadclasspath-a96ecfeda0ed0c9d3d5735d70bf9d1b1c17c119c.tar.gz
2005-10-14 Audrius Meskauskas <AudriusA@Bioinformatics.org>
* org/omg/CORBA/LocalObject.java (_get_interface, _invoke, _is_local, _orb, _releaseReply, _request, _servant_postinvoke, _servant_preinvoke, validate_connection: New methods.
Diffstat (limited to 'org')
-rw-r--r--org/omg/CORBA/LocalObject.java128
1 files changed, 128 insertions, 0 deletions
diff --git a/org/omg/CORBA/LocalObject.java b/org/omg/CORBA/LocalObject.java
index 4b6ae68af..7c06e1824 100644
--- a/org/omg/CORBA/LocalObject.java
+++ b/org/omg/CORBA/LocalObject.java
@@ -49,6 +49,13 @@ import org.omg.CORBA.NamedValue;
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 {@link Object}, but actually
@@ -141,6 +148,17 @@ public class LocalObject
*
* @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
{
@@ -232,4 +250,114 @@ public class LocalObject
{
throw new NO_IMPLEMENT(INAPPROPRIATE);
}
+
+ /**
+ * This method is called from <code>rmic</code> generated stubs if the
+ * {@link 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
+ * {@link _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
+ * {@link Util#isLocal()}, called passing <code>this</code> as parameter,
+ * returns true, and the {@link #_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 {@link _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 {@link 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);
+ }
} \ No newline at end of file