KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > lutris > appserver > server > httpPresentation > HttpPresentationComms


1
2 /*
3  * Enhydra Java Application Server Project
4  *
5  * The contents of this file are subject to the Enhydra Public License
6  * Version 1.1 (the "License"); you may not use this file except in
7  * compliance with the License. You may obtain a copy of the License on
8  * the Enhydra web site ( http://www.enhydra.org/ ).
9  *
10  * Software distributed under the License is distributed on an "AS IS"
11  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
12  * the License for the specific terms governing rights and limitations
13  * under the License.
14  *
15  * The Initial Developer of the Enhydra Application Server is Lutris
16  * Technologies, Inc. The Enhydra Application Server and portions created
17  * by Lutris Technologies, Inc. are Copyright Lutris Technologies, Inc.
18  * All Rights Reserved.
19  *
20  * Contributor(s):
21  *
22  * $Id: HttpPresentationComms.java,v 1.3 2005/03/24 10:51:16 slobodan Exp $
23  */

24
25
26 package com.lutris.appserver.server.httpPresentation;
27
28 import org.enhydra.util.jivan.JivanFactory;
29 import org.enhydra.xml.xmlc.XMLCFactory;
30
31 import com.lutris.appserver.server.Application;
32 import com.lutris.appserver.server.session.Session;
33 import com.lutris.appserver.server.session.SessionData;
34
35 /**
36  * Object passed to presentation objects that contains HTTP and Presentation
37  * Manager access and control objects.
38  */

39 public class HttpPresentationComms {
40     /**
41      * Object used to access HTTP request data.
42      */

43     public final HttpPresentationRequest request;
44
45     /**
46      * Object used to generate HTTP responses.
47      */

48     public final HttpPresentationResponse response;
49
50     /**
51      * Application object that this presentation is associated with.
52      * If null, no application is associated.
53      */

54     public final Application application;
55
56     /**
57      * Session object that this presentation is associated with.
58      * If null, no session has been associated by the application.
59      */

60     public Session session;
61
62     /**
63      * Session data object. This is a handy reference to
64      * <CODE>session.getSessionData()</CODE>
65      */

66     public SessionData sessionData;
67
68     /**
69      * If an exception/error occured, this field is set to the exception
70      * object. This is only set for and used by `ErrorHandler' presentations.
71      */

72     public Throwable JavaDoc exception;
73
74     /**
75      * Reference to the XMLC factory object contained in the application.
76      */

77     public XMLCFactory xmlcFactory;
78
79 // vr -----------------------------------------------
80
/**
81      * Reference to the Jivan DocumentFactory object contained in the application.
82      */

83     public JivanFactory jivanFactory;
84 // vr -----------------------------------------------
85

86     /**
87      * Construct an object, setting all of its fields.
88      *
89      * @param request Object used to access HTTP request data.
90      * @param response Object used to generate HTTP responses.
91      * @param application Application object that this presentation is
92      * associated with or null if no application is associated.
93      */

94     protected HttpPresentationComms (HttpPresentationRequest request,
95                                      HttpPresentationResponse response,
96                                      Application application) {
97         this.request = request;
98         this.response = response;
99         this.application = application;
100         this.xmlcFactory = application.getXMLCFactory();
101 // vr -----------------------------------------------
102
this.jivanFactory = application.getJivanFactory();
103 // vr -----------------------------------------------
104
}
105
106 }
107
Popular Tags