View Javadoc

1   /*
2    * Created on Nov 4, 2003
3    *
4    * Copyright neotechnologies.org
5    */
6   package org.neo.swarm.util.network.tcp;
7   
8   /***
9    * Provides TcpServiceAPI for AsyncSocket data publishing. Works
10   * by pushing each connection into a ConnectionPool. The connection
11   * pool is async serviced by the thread pool. As each socket is serviced it
12   * gets passed onto the appropriate component.
13   * 
14   * @author neil.avery
15   */
16  public interface TcpServiceAPI {
17  	
18  	//public void create(int ip, int port);
19  	/***
20  	 * Start server processing incoming requests and wait for it to bind to address
21  	 */
22  	public void startServer() throws Exception;
23  	/***
24  	 * Stop the server from processing and more TCP incoming requests
25  	 * @throws Exception
26  	 */
27  	public void stopServer() throws Exception;
28  
29  }