KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > invocation > iiop > ServantRegistry


1 /*
2 * JBoss, Home of Professional Open Source
3 * Copyright 2005, JBoss Inc., and individual contributors as indicated
4 * by the @authors tag. See the copyright.txt in the distribution for a
5 * full listing of individual contributors.
6 *
7 * This is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License as
9 * published by the Free Software Foundation; either version 2.1 of
10 * the License, or (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this software; if not, write to the Free
19 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21 */

22 package org.jboss.invocation.iiop;
23
24 import org.omg.CORBA.Policy JavaDoc;
25 import org.omg.PortableServer.Servant JavaDoc;
26
27 /**
28  * Interface of a registry for CORBA servants.
29  *
30  * @author <a HREF="mailto:reverbel@ime.usp.br">Francisco Reverbel</a>
31  * @version $Revision: 37459 $
32  */

33 public interface ServantRegistry
34 {
35
36    /**
37     * Binds <code>name</code> to <code>servant</code>, with the given
38     * <code>policies</code>. Returns a <code>ReferenceFactory</code>
39     * that should be used to create CORBA references to the object(s)
40     * implemented by <code>servant</code>. A CORBA reference created by this
41     * factory will contain <code>name</code> as the servant id embedded in the
42     * reference. If the servant implements more than one CORBA object,
43     * references for such objects should be created by the
44     * <code>ReferenceFactory</code> method
45     * <code>createReferenceWithId()</code>, which takes an <code>id</code>
46     * parameter to distinguish among the objects implemented by the same
47     * servant. Otherwise (if the servant implements a single CORBA object)
48     * the method <code>createReference()</code> should be used.
49     *
50     */

51    ReferenceFactory bind(String JavaDoc name, Servant JavaDoc servant, Policy JavaDoc[] policies)
52          throws Exception JavaDoc;
53
54    /**
55     * Binds <code>name</code> to <code>servant</code>. Returns a
56     * <code>ReferenceFactory</code> that should be used to create CORBA
57     * references to the object(s) implemented by <code>servant</code>.
58     * For the usage of this <code>ReferenceFactory</code>, see method
59     * above.
60     */

61    ReferenceFactory bind(String JavaDoc name, Servant JavaDoc servant)
62          throws Exception JavaDoc;
63
64    /**
65     * Unbinds the servant bound to <code>name</code>.
66     */

67    void unbind(String JavaDoc name)
68          throws Exception JavaDoc;
69
70 }
71
Popular Tags