001 /** 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017 package org.apache.geronimo.corba.security.config; 018 019 import org.omg.CORBA.ORB; 020 021 import org.apache.geronimo.corba.CORBABean; 022 import org.apache.geronimo.corba.CSSBean; 023 024 025 /** 026 * Translates TSS and CSS configurations into CORBA startup args and properties. 027 * 028 * @version $Revision: 477622 $ $Date: 2006-11-21 03:03:24 -0800 (Tue, 21 Nov 2006) $ 029 */ 030 public interface ConfigAdapter { 031 032 /** 033 * Create an ORB for a CORBABean server context. 034 * 035 * @param server The CORBABean that owns this ORB's configuration. 036 * 037 * @return An ORB instance configured for the CORBABean. 038 * @exception ConfigException 039 */ 040 public ORB createServerORB(CORBABean server) throws ConfigException; 041 /** 042 * Create an ORB for a CSSBean nameservice client context. 043 * 044 * @param client The configured CSSBean used for access. 045 * 046 * @return An ORB instance configured for this client access. 047 * @exception ConfigException 048 */ 049 050 public ORB createNameServiceClientORB(CSSBean client) throws ConfigException; 051 /** 052 * Create an ORB for a CSSBean client context. 053 * 054 * @param client The configured CSSBean used for access. 055 * 056 * @return An ORB instance configured for this client access. 057 * @exception ConfigException 058 */ 059 public ORB createClientORB(CSSBean client) throws ConfigException; 060 061 /** 062 * Create a transient name service instance using the 063 * specified host name and port. 064 * 065 * @param host The String host name. 066 * @param port The port number of the listener. 067 * 068 * @return An opaque object that represents the name service. 069 * @exception ConfigException 070 */ 071 public Object createNameService(String host, int port) throws ConfigException; 072 /** 073 * Destroy a name service instance created by a 074 * prior call to createNameService(). 075 * 076 * @param ns The opaque name service object returned from a 077 * prior call to createNameService(). 078 */ 079 public void destroyNameService(Object ns); 080 }