Source code: com/lutris/appserver/server/httpPresentation/HttpPresentationComms.java
1 /*
2 * Enhydra Java Application Server Project
3 *
4 * The contents of this file are subject to the Enhydra Public License
5 * Version 1.1 (the "License"); you may not use this file except in
6 * compliance with the License. You may obtain a copy of the License on
7 * the Enhydra web site ( http://www.enhydra.org/ ).
8 *
9 * Software distributed under the License is distributed on an "AS IS"
10 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
11 * the License for the specific terms governing rights and limitations
12 * under the License.
13 *
14 * The Initial Developer of the Enhydra Application Server is Lutris
15 * Technologies, Inc. The Enhydra Application Server and portions created
16 * by Lutris Technologies, Inc. are Copyright Lutris Technologies, Inc.
17 * All Rights Reserved.
18 *
19 * Contributor(s):
20 *
21 * $Id: HttpPresentationComms.java,v 1.21.14.1 2000/10/19 17:59:06 jasona Exp $
22 */
23
24
25
26
27
28 package com.lutris.appserver.server.httpPresentation;
29
30 import com.lutris.appserver.server.*;
31 import com.lutris.appserver.server.session.*;
32 import org.enhydra.xml.xmlc.XMLCFactory;
33
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 exception;
73
74 /**
75 * Reference to the XMLC factory object contained in the application.
76 */
77 public XMLCFactory xmlcFactory;
78
79 /**
80 * Construct an object, setting all of its fields.
81 *
82 * @param request Object used to access HTTP request data.
83 * @param response Object used to generate HTTP responses.
84 * @param application Application object that this presentation is
85 * associated with or null if no application is associated.
86 */
87 protected HttpPresentationComms (HttpPresentationRequest request,
88 HttpPresentationResponse response,
89 Application application) {
90 this.request = request;
91 this.response = response;
92 this.application = application;
93 this.xmlcFactory = application.getXMLCFactory();
94 }
95
96 }