01: /*
02: * Copyright (c) xsocket.org, 2006 - 2008. All rights reserved.
03: *
04: * This library is free software; you can redistribute it and/or
05: * modify it under the terms of the GNU Lesser General Public
06: * License as published by the Free Software Foundation; either
07: * version 2.1 of the License, or (at your option) any later version.
08: *
09: * This library is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12: * Lesser General Public License for more details.
13: *
14: * You should have received a copy of the GNU Lesser General Public
15: * License along with this library; if not, write to the Free Software
16: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17: *
18: * Please refer to the LGPL license at: http://www.gnu.org/copyleft/lesser.txt
19: * The latest copy of this software may be found on http://www.xsocket.org/
20: */
21: package org.xsocket.connection.spi;
22:
23: import java.io.IOException;
24: import java.net.InetSocketAddress;
25: import java.util.Map;
26:
27: import javax.management.JMException;
28: import javax.management.ObjectName;
29:
30: import org.xsocket.connection.Server;
31:
32: /**
33: * Server IO Provider specification <br><br>
34: *
35: * @author grro@xsocket.org
36: */
37: public interface IServerIoProvider extends IHandlerIoProvider {
38:
39: public static final String PROVIDER_CLASSNAME_KEY = "org.xsocket.stream.io.ServerIoProviderClass";
40:
41: /**
42: * Return the version of this implementation. It consists of any string assigned
43: * by the vendor of this implementation and does not have any particular syntax
44: * specified or expected by the Java runtime. It may be compared for equality
45: * with other package version strings used for this implementation
46: * by this vendor for this package.
47: *
48: * @return the version of the implementation
49: */
50: public String getImplementationVersion();
51:
52: /**
53: * create acceptor
54: *
55: * @param callback the acceptor callback
56: * @param address the listen address
57: * @param backlog the backlog
58: * @param options the acceptor socket options
59: * @return the acceptor
60: * @throws IOException If some other I/O error occurs
61: */
62: public IAcceptor createAcceptor(IAcceptorCallback callback,
63: InetSocketAddress address, int backlog,
64: Map<String, Object> options) throws IOException;
65:
66: /**
67: * register the mbeans of the io implementation based on the given address by using the PlattformMBeanServer
68: *
69: * @param server the server
70: * @param acceptor the assigned acceptor
71: * @param domain the domain
72: * @param address the address
73: * @return the object name
74: * @throws JMException if an exception occurs
75: */
76: public ObjectName registerMBeans(Server server, IAcceptor acceptor,
77: String domain, String address) throws JMException;
78:
79: }
|