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 
  26 package com.sun.corba.se.spi.protocol;
  27 
  28 import java.util.Set;
  29 
  30 import com.sun.corba.se.pept.protocol.ClientRequestDispatcher ;
  31 import com.sun.corba.se.spi.protocol.CorbaServerRequestDispatcher ;
  32 import com.sun.corba.se.spi.protocol.LocalClientRequestDispatcherFactory ;
  33 
  34 import com.sun.corba.se.spi.oa.ObjectAdapterFactory ;
  35 
  36 /**
  37  * This is a registry of all subcontract ID dependent objects.  This includes:
  38  * LocalClientRequestDispatcherFactory, ClientRequestDispatcher, ServerRequestDispatcher, and
  39  * ObjectAdapterFactory.
  40  * XXX Should the registerXXX methods take an scid or not?  I think we
  41  * want to do this so that the same instance can be shared across multiple
  42  * scids (and this is already true for ObjectAdapterFactory and LocalClientRequestDispatcherFactory),
  43  * but this will require some changes for ClientRequestDispatcher and ServerRequestDispatcher.
  44  */
  45 public interface RequestDispatcherRegistry {
  46     // XXX needs javadocs!
  47 
  48     void registerClientRequestDispatcher( ClientRequestDispatcher csc, int scid) ;
  49 
  50     ClientRequestDispatcher getClientRequestDispatcher( int scid ) ;
  51 
  52     void registerLocalClientRequestDispatcherFactory( LocalClientRequestDispatcherFactory csc, int scid) ;
  53 
  54     LocalClientRequestDispatcherFactory getLocalClientRequestDispatcherFactory( int scid ) ;
  55 
  56     void registerServerRequestDispatcher( CorbaServerRequestDispatcher ssc, int scid) ;
  57 
  58     CorbaServerRequestDispatcher getServerRequestDispatcher(int scid) ;
  59 
  60     void registerServerRequestDispatcher( CorbaServerRequestDispatcher ssc, String name ) ;
  61 
  62     CorbaServerRequestDispatcher getServerRequestDispatcher( String name ) ;
  63 
  64     void registerObjectAdapterFactory( ObjectAdapterFactory oaf, int scid) ;
  65 
  66     ObjectAdapterFactory getObjectAdapterFactory( int scid ) ;
  67 
  68     Set getObjectAdapterFactories() ;
  69 }