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.impl;
09:
10: import java.io.IOException;
11: import java.net.ServerSocket;
12:
13: /**
14: * Monitor used to monitor events in the AcceptorManager.
15: *
16: * @author Peter Donald
17: * @version $Revision: 1.2 $ $Date: 2004/03/21 23:42:59 $
18: */
19: public interface AcceptorMonitor {
20: /**
21: * Aceptor create with name for specified socket.
22: *
23: * @param name the acceptor name
24: * @param serverSocket the socket
25: */
26: void acceptorCreated(String name, ServerSocket serverSocket);
27:
28: /**
29: * About to close down acceptor and stop listening for
30: * connections.
31: *
32: * @param name the acceptor name
33: * @param serverSocket the socket
34: */
35: void acceptorClosing(String name, ServerSocket serverSocket);
36:
37: /**
38: * Listening for connection attempts in acceptor.
39: *
40: * @param name the acceptor name
41: * @param serverSocket the socket
42: */
43: void serverSocketListening(String name, ServerSocket serverSocket);
44:
45: /**
46: * There was an error accepting client connections.
47: *
48: * @param name the name of acceptor
49: * @param ioe the exception
50: */
51: void errorAcceptingConnection(String name, IOException ioe);
52:
53: /**
54: * There was an error closing server socket.
55: *
56: * @param name the name of acceptor
57: * @param ioe the exception
58: */
59: void errorClosingServerSocket(String name, IOException ioe);
60: }
|