blob: 30193ed19672287f70cda633a28b180b78d91dd7 [file] [log] [blame]
J. Duke319a3b92007-12-01 00:00:00 +00001/*
2 * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Sun designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Sun in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22 * CA 95054 USA or visit www.sun.com if you need additional information or
23 * have any questions.
24 */
25
26package sun.net.httpserver;
27
28import java.io.*;
29import java.nio.*;
30import java.nio.channels.*;
31import java.net.*;
32import javax.net.ssl.*;
33import java.util.*;
34import sun.net.www.MessageHeader;
35import com.sun.net.httpserver.*;
36import com.sun.net.httpserver.spi.*;
37
38class HttpsExchangeImpl extends HttpsExchange {
39
40 ExchangeImpl impl;
41
42 HttpsExchangeImpl (ExchangeImpl impl) throws IOException {
43 this.impl = impl;
44 }
45
46 public Headers getRequestHeaders () {
47 return impl.getRequestHeaders();
48 }
49
50 public Headers getResponseHeaders () {
51 return impl.getResponseHeaders();
52 }
53
54 public URI getRequestURI () {
55 return impl.getRequestURI();
56 }
57
58 public String getRequestMethod (){
59 return impl.getRequestMethod();
60 }
61
62 public HttpContextImpl getHttpContext (){
63 return impl.getHttpContext();
64 }
65
66 public void close () {
67 impl.close();
68 }
69
70 public InputStream getRequestBody () {
71 return impl.getRequestBody();
72 }
73
74 public int getResponseCode () {
75 return impl.getResponseCode();
76 }
77
78 public OutputStream getResponseBody () {
79 return impl.getResponseBody();
80 }
81
82
83 public void sendResponseHeaders (int rCode, long contentLen)
84 throws IOException
85 {
86 impl.sendResponseHeaders (rCode, contentLen);
87 }
88
89 public InetSocketAddress getRemoteAddress (){
90 return impl.getRemoteAddress();
91 }
92
93 public InetSocketAddress getLocalAddress (){
94 return impl.getLocalAddress();
95 }
96
97 public String getProtocol (){
98 return impl.getProtocol();
99 }
100
101 public SSLSession getSSLSession () {
102 return impl.getSSLSession ();
103 }
104
105 public Object getAttribute (String name) {
106 return impl.getAttribute (name);
107 }
108
109 public void setAttribute (String name, Object value) {
110 impl.setAttribute (name, value);
111 }
112
113 public void setStreams (InputStream i, OutputStream o) {
114 impl.setStreams (i, o);
115 }
116
117 public HttpPrincipal getPrincipal () {
118 return impl.getPrincipal();
119 }
120
121 ExchangeImpl getExchangeImpl () {
122 return impl;
123 }
124}