ObjectKeyTemplate.java revision 608:7e06bf1dcb09
177957Sbenno/* 277957Sbenno * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved. 377957Sbenno * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 477957Sbenno * 577957Sbenno * This code is free software; you can redistribute it and/or modify it 677957Sbenno * under the terms of the GNU General Public License version 2 only, as 777957Sbenno * published by the Free Software Foundation. Oracle designates this 877957Sbenno * particular file as subject to the "Classpath" exception as provided 977957Sbenno * by Oracle in the LICENSE file that accompanied this code. 1077957Sbenno * 1177957Sbenno * This code is distributed in the hope that it will be useful, but WITHOUT 1277957Sbenno * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1377957Sbenno * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1477957Sbenno * version 2 for more details (a copy is included in the LICENSE file that 1577957Sbenno * accompanied this code). 1677957Sbenno * 1777957Sbenno * You should have received a copy of the GNU General Public License version 1877957Sbenno * 2 along with this work; if not, write to the Free Software Foundation, 1977957Sbenno * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2077957Sbenno * 2177957Sbenno * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2277957Sbenno * or visit www.oracle.com if you need additional information or have any 2377957Sbenno * questions. 2477957Sbenno */ 2577957Sbenno 2677957Sbennopackage com.sun.corba.se.spi.ior; 2777957Sbenno 2877957Sbennoimport org.omg.CORBA_2_3.portable.OutputStream ; 2977957Sbenno 3077957Sbennoimport com.sun.corba.se.spi.orb.ORBVersion ; 3177957Sbennoimport com.sun.corba.se.spi.orb.ORB ; 3277957Sbenno 3377957Sbennoimport com.sun.corba.se.spi.protocol.CorbaServerRequestDispatcher ; 3477957Sbenno 3577957Sbenno/** An ObjectKeyTemplate represents the part of an Object Key 3677957Sbenno * that corresponds to the object adapter used to create an 3777957Sbenno * object reference. The template is shared between many 38209975Snwhitehorn * object references. 3977957Sbenno */ 4077957Sbennopublic interface ObjectKeyTemplate extends Writeable 4199036Sbenno{ 4291467Sbenno public ORBVersion getORBVersion() ; 4391467Sbenno 44209975Snwhitehorn /** An ID used to determine how to perform operations on this 4591467Sbenno * ObjectKeyTemplate. This id determines how to process requests 4691467Sbenno * on this object reference, and what object adapter type to use. 4791467Sbenno */ 4891467Sbenno public int getSubcontractId(); 4991467Sbenno 50266004Sian /** Return the server ID for this template. 51266004Sian * For CORBA 3.0, this should be a String, but it is currently 52266004Sian * an int in the object key template. 5377957Sbenno */ 5491467Sbenno public int getServerId() ; 5591467Sbenno 5677957Sbenno /** Return the ORB ID for this template. 5796499Sbenno */ 5896499Sbenno public String getORBId() ; 59188860Snwhitehorn 60188860Snwhitehorn /** Return the object adapter ID for this template. 61188860Snwhitehorn */ 62188860Snwhitehorn public ObjectAdapterId getObjectAdapterId() ; 63213456Snwhitehorn 64209975Snwhitehorn /** Compute an adapter ID for this template than includes 65188860Snwhitehorn * all of the template information. 66188860Snwhitehorn * This value is cached to avoid the expense of recomputing 67176742Sraj * it. 68176742Sraj */ 69176742Sraj public byte[] getAdapterId() ; 70212715Snwhitehorn 71209975Snwhitehorn public void write(ObjectId objectId, OutputStream os); 72176742Sraj 73176742Sraj public CorbaServerRequestDispatcher getServerRequestDispatcher( ORB orb, ObjectId id ) ; 74189100Sraj} 75176742Sraj