1 22 package org.jboss.test.invokers.ejb; 23 24 import java.io.IOException ; 25 import java.net.Socket ; 26 import java.net.ServerSocket ; 27 28 38 class CompressionServerSocket extends ServerSocket 39 { 40 private boolean closed; 41 42 public CompressionServerSocket(int port) throws IOException 43 { 44 super(port); 45 } 46 47 public Socket accept() throws IOException 48 { 49 Socket s = new CompressionSocket(); 50 implAccept(s); 51 return s; 52 } 53 54 public int getLocalPort() 55 { 56 if( closed == true ) 57 return -1; 58 return super.getLocalPort(); 59 } 60 61 public void close() throws IOException 62 { 63 closed = true; 64 super.close(); 65 } 66 } 67 | Popular Tags |