1/* 2 * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26package com.sun.corba.se.spi.ior; 27 28import org.omg.CORBA_2_3.portable.OutputStream ; 29 30import com.sun.corba.se.spi.orb.ORBVersion ; 31import com.sun.corba.se.spi.orb.ORB ; 32 33import com.sun.corba.se.spi.protocol.CorbaServerRequestDispatcher ; 34 35/** An ObjectKeyTemplate represents the part of an Object Key 36 * that corresponds to the object adapter used to create an 37 * object reference. The template is shared between many 38 * object references. 39 */ 40public interface ObjectKeyTemplate extends Writeable 41{ 42 public ORBVersion getORBVersion() ; 43 44 /** An ID used to determine how to perform operations on this 45 * ObjectKeyTemplate. This id determines how to process requests 46 * on this object reference, and what object adapter type to use. 47 */ 48 public int getSubcontractId(); 49 50 /** Return the server ID for this template. 51 * For CORBA 3.0, this should be a String, but it is currently 52 * an int in the object key template. 53 */ 54 public int getServerId() ; 55 56 /** Return the ORB ID for this template. 57 */ 58 public String getORBId() ; 59 60 /** Return the object adapter ID for this template. 61 */ 62 public ObjectAdapterId getObjectAdapterId() ; 63 64 /** Compute an adapter ID for this template than includes 65 * all of the template information. 66 * This value is cached to avoid the expense of recomputing 67 * it. 68 */ 69 public byte[] getAdapterId() ; 70 71 public void write(ObjectId objectId, OutputStream os); 72 73 public CorbaServerRequestDispatcher getServerRequestDispatcher( ORB orb, ObjectId id ) ; 74} 75