KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > codehaus > spice > netserve > connection > handlers > MockRequestHandler


1 /*
2  * Copyright (C) The Spice Group. All rights reserved.
3  *
4  * This software is published under the terms of the Spice
5  * Software License version 1.1, a copy of which has been included
6  * with this distribution in the LICENSE.txt file.
7  */

8 package org.codehaus.spice.netserve.connection.handlers;
9
10 import java.net.Socket JavaDoc;
11
12 /**
13  *
14  * @author Peter Donald
15  * @version $Revision: 1.2 $ $Date: 2004/03/21 23:42:59 $
16  */

17 class MockRequestHandler
18     extends AbstractRequestHandler
19 {
20     private Socket JavaDoc m_performRequestSocket;
21
22     private Socket JavaDoc m_errorClosingConnectionSocket;
23     private Throwable JavaDoc m_errorClosingConnectionThrowable;
24
25     private Socket JavaDoc m_errorHandlingConnectionSocket;
26     private Throwable JavaDoc m_errorHandlingConnectionThrowable;
27
28     protected void doPerformRequest( Socket JavaDoc socket )
29         throws Exception JavaDoc
30     {
31         m_performRequestSocket = socket;
32     }
33
34     protected void errorClosingConnection( Socket JavaDoc socket,
35                                            Throwable JavaDoc t )
36     {
37         super.errorClosingConnection( socket, t );
38         m_errorClosingConnectionSocket = socket;
39         m_errorClosingConnectionThrowable = t;
40     }
41
42     protected void errorHandlingConnection( Socket JavaDoc socket,
43                                             Throwable JavaDoc t )
44     {
45         super.errorHandlingConnection( socket, t );
46         m_errorHandlingConnectionSocket = socket;
47         m_errorHandlingConnectionThrowable = t;
48     }
49
50     Socket JavaDoc getPerformRequestSocket()
51     {
52         return m_performRequestSocket;
53     }
54
55     Socket JavaDoc getErrorClosingConnectionSocket()
56     {
57         return m_errorClosingConnectionSocket;
58     }
59
60     Throwable JavaDoc getErrorClosingConnectionThrowable()
61     {
62         return m_errorClosingConnectionThrowable;
63     }
64
65     Socket JavaDoc getErrorHandlingConnectionSocket()
66     {
67         return m_errorHandlingConnectionSocket;
68     }
69
70     Throwable JavaDoc getErrorHandlingConnectionThrowable()
71     {
72         return m_errorHandlingConnectionThrowable;
73     }
74 }
75
76
Popular Tags