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.handlers;
09:
10: import java.net.Socket;
11:
12: /**
13: *
14: * @author Peter Donald
15: * @version $Revision: 1.2 $ $Date: 2004/03/21 23:42:59 $
16: */
17: class MockRequestHandler extends AbstractRequestHandler {
18: private Socket m_performRequestSocket;
19:
20: private Socket m_errorClosingConnectionSocket;
21: private Throwable m_errorClosingConnectionThrowable;
22:
23: private Socket m_errorHandlingConnectionSocket;
24: private Throwable m_errorHandlingConnectionThrowable;
25:
26: protected void doPerformRequest(Socket socket) throws Exception {
27: m_performRequestSocket = socket;
28: }
29:
30: protected void errorClosingConnection(Socket socket, Throwable t) {
31: super .errorClosingConnection(socket, t);
32: m_errorClosingConnectionSocket = socket;
33: m_errorClosingConnectionThrowable = t;
34: }
35:
36: protected void errorHandlingConnection(Socket socket, Throwable t) {
37: super .errorHandlingConnection(socket, t);
38: m_errorHandlingConnectionSocket = socket;
39: m_errorHandlingConnectionThrowable = t;
40: }
41:
42: Socket getPerformRequestSocket() {
43: return m_performRequestSocket;
44: }
45:
46: Socket getErrorClosingConnectionSocket() {
47: return m_errorClosingConnectionSocket;
48: }
49:
50: Throwable getErrorClosingConnectionThrowable() {
51: return m_errorClosingConnectionThrowable;
52: }
53:
54: Socket getErrorHandlingConnectionSocket() {
55: return m_errorHandlingConnectionSocket;
56: }
57:
58: Throwable getErrorHandlingConnectionThrowable() {
59: return m_errorHandlingConnectionThrowable;
60: }
61: }
|