KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > remoting > security > ServerSocketFactoryMBean


1 package org.jboss.remoting.security;
2
3 import java.io.IOException JavaDoc;
4 import java.net.InetAddress JavaDoc;
5 import java.net.ServerSocket JavaDoc;
6
7 /**
8  * This interface is due to the constraint added by using JMX based configuration.
9  * If want to inject a custom server socket factory (or the one provided by JBossRemoting),
10  * it has to implement this interface. This is due to the fact that concrete objects can not
11  * be injected at this point, only interfaces (and the java language ServerSocketFactory
12  * class does not implement any interface).
13  *
14  * @author <a HREF="mailto:telrod@e2technologies.net">Tom Elrod</a>
15  */

16 public interface ServerSocketFactoryMBean
17 {
18    /**
19     * Returns an unbound server socket. The socket is configured with the socket
20     * options (such as accept timeout) given to this factory.
21     *
22     * @return
23     * @throws IOException
24     */

25    ServerSocket JavaDoc createServerSocket() throws IOException JavaDoc;
26
27    /**
28     * Returns a server socket bound to the specified port. The socket is configured
29     * with the socket options (such as accept timeout) given to this factory.
30     *
31     * @param i
32     * @return
33     * @throws IOException
34     */

35    ServerSocket JavaDoc createServerSocket(int i) throws IOException JavaDoc;
36
37    /**
38     * Returns a server socket bound to the specified port,
39     * and uses the specified connection backlog. The socket is configured
40     * with the socket options (such as accept timeout) given to this factory.
41     *
42     * @param i
43     * @param i1
44     * @return
45     * @throws IOException
46     */

47    ServerSocket JavaDoc createServerSocket(int i, int i1) throws IOException JavaDoc;
48
49    /**
50     * Returns a server socket bound to the specified port, with a specified
51     * listen backlog and local IP. The bindAddr argument can be used on a multi-homed
52     * host for a ServerSocket that will only accept connect requests to one of its addresses.
53     * The socket is configured with the socket options (such as accept timeout) given to this factory.
54     *
55     * @param i
56     * @param i1
57     * @param inetAddress
58     * @return
59     * @throws IOException
60     */

61    ServerSocket JavaDoc createServerSocket(int i, int i1, InetAddress JavaDoc inetAddress) throws IOException JavaDoc;
62 }
63
Popular Tags