KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > geronimo > interop > adapter > Adapter


1 /**
2  *
3  * Copyright 2004-2005 The Apache Software Foundation
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  *
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18 package org.apache.geronimo.interop.adapter;
19
20 import org.apache.geronimo.interop.rmi.iiop.ObjectRef;
21 import org.apache.geronimo.interop.rmi.iiop.RemoteInterface;
22 //import org.openejb.EJBContainer;
23

24 import java.lang.reflect.Constructor JavaDoc;
25 import java.lang.reflect.InvocationTargetException JavaDoc;
26
27 public abstract class Adapter
28 {
29     public abstract Object JavaDoc getAdapterID();
30     public abstract String JavaDoc[] getBindNames();
31
32     public abstract void start();
33     public abstract void stop();
34
35     public abstract ObjectRef getObjectRef();
36
37     public abstract Object JavaDoc getServant();
38 // public abstract EJBContainer getEJBContainer();
39
// public abstract Object getEJBHome();
40

41     public abstract void invoke(java.lang.String JavaDoc methodName, byte[] objectKey, org.apache.geronimo.interop.rmi.iiop.ObjectInputStream input, org.apache.geronimo.interop.rmi.iiop.ObjectOutputStream output);
42
43
44     protected Class JavaDoc loadClass( String JavaDoc className, ClassLoader JavaDoc cl )
45     {
46         Class JavaDoc rc = null;
47         try {
48             rc = cl.loadClass(className);
49         } catch (ClassNotFoundException JavaDoc e) {
50             e.printStackTrace();
51         }
52         return rc;
53     }
54
55 }
56
Popular Tags