1 8 package org.codehaus.spice.netserve.connection.impl; 9 10 import java.io.IOException ; 11 import java.net.ServerSocket ; 12 13 18 class RecordingAcceptorMonitor 19 extends NullAcceptorMonitor 20 { 21 private IOException m_errorClosingServerSocket; 22 private IOException m_errorAcceptingConnection; 23 private int m_listenCount; 24 25 public void serverSocketListening( String name, ServerSocket serverSocket ) 26 { 27 m_listenCount++; 28 super.serverSocketListening( name, serverSocket ); 29 } 30 31 public void errorAcceptingConnection( String name, IOException ioe ) 32 { 33 m_errorAcceptingConnection = ioe; 34 super.errorAcceptingConnection( name, ioe ); 35 } 36 37 public void errorClosingServerSocket( String name, IOException ioe ) 38 { 39 m_errorClosingServerSocket = ioe; 40 super.errorClosingServerSocket( name, ioe ); 41 } 42 43 IOException getErrorClosingServerSocket() 44 { 45 return m_errorClosingServerSocket; 46 } 47 48 IOException getErrorAcceptingConnection() 49 { 50 return m_errorAcceptingConnection; 51 } 52 53 int getListenCount() 54 { 55 return m_listenCount; 56 } 57 } 58 | Popular Tags |