0N/A/*
2362N/A * Copyright (c) 1998, 2001, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/A
0N/Apackage java.rmi.server;
0N/A
0N/Aimport java.io.*;
0N/Aimport java.net.*;
0N/A
0N/A/**
0N/A * An <code>RMIServerSocketFactory</code> instance is used by the RMI runtime
0N/A * in order to obtain server sockets for RMI calls. A remote object can be
0N/A * associated with an <code>RMIServerSocketFactory</code> when it is
0N/A * created/exported via the constructors or <code>exportObject</code> methods
0N/A * of <code>java.rmi.server.UnicastRemoteObject</code> and
0N/A * <code>java.rmi.activation.Activatable</code> .
0N/A *
0N/A * <p>An <code>RMIServerSocketFactory</code> instance associated with a remote
0N/A * object is used to obtain the <code>ServerSocket</code> used to accept
0N/A * incoming calls from clients.
0N/A *
0N/A * <p>An <code>RMIServerSocketFactory</code> instance can also be associated
0N/A * with a remote object registry so that clients can use custom socket
0N/A * communication with a remote object registry.
0N/A *
0N/A * <p>An implementation of this interface
0N/A * should implement {@link Object#equals} to return <code>true</code> when
0N/A * passed an instance that represents the same (functionally equivalent)
0N/A * server socket factory, and <code>false</code> otherwise (and it should also
0N/A * implement {@link Object#hashCode} consistently with its
0N/A * <code>Object.equals</code> implementation).
0N/A *
0N/A * @author Ann Wollrath
0N/A * @author Peter Jones
0N/A * @since 1.2
0N/A * @see java.rmi.server.UnicastRemoteObject
0N/A * @see java.rmi.activation.Activatable
0N/A * @see java.rmi.registry.LocateRegistry
0N/A */
0N/Apublic interface RMIServerSocketFactory {
0N/A
0N/A /**
0N/A * Create a server socket on the specified port (port 0 indicates
0N/A * an anonymous port).
0N/A * @param port the port number
0N/A * @return the server socket on the specified port
0N/A * @exception IOException if an I/O error occurs during server socket
0N/A * creation
0N/A * @since 1.2
0N/A */
0N/A public ServerSocket createServerSocket(int port)
0N/A throws IOException;
0N/A}