KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > corba > se > spi > protocol > LocalClientRequestDispatcher


1 /*
2  * @(#)LocalClientRequestDispatcher.java 1.6 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package com.sun.corba.se.spi.protocol;
9
10 import org.omg.CORBA.portable.ServantObject JavaDoc;
11
12 /**
13  * @author Harold Carr
14  */

15
16 public interface LocalClientRequestDispatcher
17 {
18     public boolean useLocalInvocation(org.omg.CORBA.Object JavaDoc self);
19
20     public boolean is_local(org.omg.CORBA.Object JavaDoc self);
21
22     /**
23      * Returns a Java reference to the servant which should be used for this
24      * request. servant_preinvoke() is invoked by a local stub.
25      * If a ServantObject object is returned, then its servant field
26      * has been set to an object of the expected type (Note: the object may
27      * or may not be the actual servant instance). The local stub may cast
28      * the servant field to the expected type, and then invoke the operation
29      * directly.
30      *
31      * @param self The object reference which delegated to this delegate.
32      *
33      * @param operation a string containing the operation name.
34      * The operation name corresponds to the operation name as it would be
35      * encoded in a GIOP request.
36      *
37      * @param expectedType a Class object representing the expected type of the servant.
38      * The expected type is the Class object associated with the operations
39      * class of the stub's interface (e.g. A stub for an interface Foo,
40      * would pass the Class object for the FooOperations interface).
41      *
42      * @return a ServantObject object.
43      * The method may return a null value if it does not wish to support
44      * this optimization (e.g. due to security, transactions, etc).
45      * The method must return null if the servant is not of the expected type.
46      */

47     public ServantObject JavaDoc servant_preinvoke(org.omg.CORBA.Object JavaDoc self,
48                        String JavaDoc operation,
49                        Class JavaDoc expectedType);
50
51     public void servant_postinvoke(org.omg.CORBA.Object JavaDoc self,
52                    ServantObject JavaDoc servant);
53 }
54
55 // End of file.
56
Popular Tags