01: /*
02: * Copyright (C) The Spice Group. All rights reserved.
03: *
04: * This software is published under the terms of the Spice
05: * Software License version 1.1, a copy of which has been included
06: * with this distribution in the LICENSE.txt file.
07: */
08: package org.codehaus.spice.netserve.connection;
09:
10: import java.net.Socket;
11:
12: /**
13: * Implement this interface to process incoming socket connections.
14: *
15: * @author Peter Donald
16: * @version $Revision: 1.2 $ $Date: 2004/03/21 23:43:00 $
17: */
18: public interface RequestHandler {
19: /**
20: * Processes connections as they occur.
21: *
22: * @param socket the socket
23: */
24: void handleConnection(Socket socket);
25:
26: /**
27: * Shutdown the handler and any requests currently being handled.
28: * The timeout specifies the time to wait while shutting
29: * down request handlers. A timeout of 0 indicates that
30: * should wait indefinetly.
31: *
32: * @param timeout the timeout
33: */
34: void shutdown(long timeout);
35: }
|