KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > ProtocolManager


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23 package com.sun.enterprise;
24
25 import java.rmi.*;
26
27 import com.sun.ejb.Container;
28
29
30 /**
31  * The ProtocolManager interface specifies the functionality of the
32  * remote communication layer, which provides the support for
33  * distribution described in Chapter 13 of the EJB spec.
34  * Possible implementations of the ProtocolManager include RMI/IIOP,
35  * RMI/JRMP, RMI/DCOM, RMI/HTTP ....
36  * @author Vivek Nagar
37  */

38 public interface ProtocolManager {
39
40     /**
41      * Return a factory that can be used to create/destroy remote
42      * references for a particular EJB type.
43      */

44     RemoteReferenceFactory getRemoteReferenceFactory(Container container,
45                                                      boolean remoteHomeView,
46                                                      String JavaDoc id);
47
48
49     /**
50      * Return true if the two object references refer to the same
51      * remote object.
52      */

53     boolean isIdentical(Remote obj1, Remote obj2);
54
55     /**
56      * Check that all Remote interfaces implemented by target object
57      * conform to the rules for valid RMI-IIOP interfaces. Throws
58      * runtime exception if validation fails.
59      */

60     void validateTargetObjectInterfaces(Remote targetObj);
61
62     /**
63      * Map the RMI exception to a protocol-specific (e.g. CORBA) exception
64      */

65     Throwable JavaDoc mapException(Throwable JavaDoc exception);
66
67
68     /**
69      * Connect the RMI object to the protocol.
70      */

71     void connectObject(Remote remoteObj) throws RemoteException;
72
73
74
75     /* All these APIs are used by J2EEServer at startup *****************/
76     /* Not used any more - DHIRU
77     public void setPersistentServerId(int id);
78     public void setPersistentServerPort(int port);
79     public void initTransactionService(String jtsclass) ;
80     */

81     public void initializeNaming(java.io.File JavaDoc dbDir, int orbInitialPort) throws Exception JavaDoc;
82     /***********************************************************************
83     public void setDaemonPort(int port);
84     public void setLocator(com.sun.enterprise.activation.Locator locator);
85     public int getListenerPort(String type) ;
86     /***********************************************************************/

87
88 }
89     
90
91
Popular Tags