2
|
1 |
/*
|
5506
|
2 |
* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
|
2
|
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
|
5506
|
7 |
* published by the Free Software Foundation. Oracle designates this
|
2
|
8 |
* particular file as subject to the "Classpath" exception as provided
|
5506
|
9 |
* by Oracle in the LICENSE file that accompanied this code.
|
2
|
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 |
*
|
5506
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
22 |
* or visit www.oracle.com if you need additional information or have any
|
|
23 |
* questions.
|
2
|
24 |
*/
|
|
25 |
|
|
26 |
package sun.net.httpserver;
|
|
27 |
|
|
28 |
import java.io.*;
|
|
29 |
import java.nio.*;
|
|
30 |
import java.nio.channels.*;
|
|
31 |
import java.net.*;
|
|
32 |
import javax.net.ssl.*;
|
|
33 |
import java.util.*;
|
|
34 |
import com.sun.net.httpserver.*;
|
|
35 |
import com.sun.net.httpserver.spi.*;
|
|
36 |
|
|
37 |
class HttpsExchangeImpl extends HttpsExchange {
|
|
38 |
|
|
39 |
ExchangeImpl impl;
|
|
40 |
|
|
41 |
HttpsExchangeImpl (ExchangeImpl impl) throws IOException {
|
|
42 |
this.impl = impl;
|
|
43 |
}
|
|
44 |
|
|
45 |
public Headers getRequestHeaders () {
|
|
46 |
return impl.getRequestHeaders();
|
|
47 |
}
|
|
48 |
|
|
49 |
public Headers getResponseHeaders () {
|
|
50 |
return impl.getResponseHeaders();
|
|
51 |
}
|
|
52 |
|
|
53 |
public URI getRequestURI () {
|
|
54 |
return impl.getRequestURI();
|
|
55 |
}
|
|
56 |
|
|
57 |
public String getRequestMethod (){
|
|
58 |
return impl.getRequestMethod();
|
|
59 |
}
|
|
60 |
|
|
61 |
public HttpContextImpl getHttpContext (){
|
|
62 |
return impl.getHttpContext();
|
|
63 |
}
|
|
64 |
|
|
65 |
public void close () {
|
|
66 |
impl.close();
|
|
67 |
}
|
|
68 |
|
|
69 |
public InputStream getRequestBody () {
|
|
70 |
return impl.getRequestBody();
|
|
71 |
}
|
|
72 |
|
|
73 |
public int getResponseCode () {
|
|
74 |
return impl.getResponseCode();
|
|
75 |
}
|
|
76 |
|
|
77 |
public OutputStream getResponseBody () {
|
|
78 |
return impl.getResponseBody();
|
|
79 |
}
|
|
80 |
|
|
81 |
|
|
82 |
public void sendResponseHeaders (int rCode, long contentLen)
|
|
83 |
throws IOException
|
|
84 |
{
|
|
85 |
impl.sendResponseHeaders (rCode, contentLen);
|
|
86 |
}
|
|
87 |
|
|
88 |
public InetSocketAddress getRemoteAddress (){
|
|
89 |
return impl.getRemoteAddress();
|
|
90 |
}
|
|
91 |
|
|
92 |
public InetSocketAddress getLocalAddress (){
|
|
93 |
return impl.getLocalAddress();
|
|
94 |
}
|
|
95 |
|
|
96 |
public String getProtocol (){
|
|
97 |
return impl.getProtocol();
|
|
98 |
}
|
|
99 |
|
|
100 |
public SSLSession getSSLSession () {
|
|
101 |
return impl.getSSLSession ();
|
|
102 |
}
|
|
103 |
|
|
104 |
public Object getAttribute (String name) {
|
|
105 |
return impl.getAttribute (name);
|
|
106 |
}
|
|
107 |
|
|
108 |
public void setAttribute (String name, Object value) {
|
|
109 |
impl.setAttribute (name, value);
|
|
110 |
}
|
|
111 |
|
|
112 |
public void setStreams (InputStream i, OutputStream o) {
|
|
113 |
impl.setStreams (i, o);
|
|
114 |
}
|
|
115 |
|
|
116 |
public HttpPrincipal getPrincipal () {
|
|
117 |
return impl.getPrincipal();
|
|
118 |
}
|
|
119 |
|
|
120 |
ExchangeImpl getExchangeImpl () {
|
|
121 |
return impl;
|
|
122 |
}
|
|
123 |
}
|