1 7 package winstone; 8 9 import java.io.IOException ; 10 import java.io.InputStream ; 11 import java.io.OutputStream ; 12 import java.net.Socket ; 13 import java.net.SocketException ; 14 15 21 public interface Listener { 22 26 public void destroy(); 27 28 31 public boolean start(); 32 33 40 public void allocateRequestResponse(Socket socket, InputStream inSocket, 41 OutputStream outSocket, RequestHandlerThread handler, 42 boolean iAmFirst) throws SocketException , IOException ; 43 44 49 public void deallocateRequestResponse(RequestHandlerThread handler, 50 WinstoneRequest req, WinstoneResponse rsp, 51 WinstoneInputStream inData, WinstoneOutputStream outData) 52 throws IOException ; 53 54 61 public String parseURI(RequestHandlerThread handler, WinstoneRequest req, 62 WinstoneResponse rsp, WinstoneInputStream inData, Socket socket, 63 boolean iAmFirst) throws IOException ; 64 65 70 public void releaseSocket(Socket socket, InputStream inSocket, 71 OutputStream outSocket) throws IOException ; 72 73 79 public boolean processKeepAlive(WinstoneRequest request, 80 WinstoneResponse response, InputStream inSocket) 81 throws IOException , InterruptedException ; 82 } 83 | Popular Tags |