Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/sun/net/httpserver/HttpsExchangeImpl.java
38918 views
/*1* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package sun.net.httpserver;2627import java.io.*;28import java.nio.*;29import java.nio.channels.*;30import java.net.*;31import javax.net.ssl.*;32import java.util.*;33import sun.net.www.MessageHeader;34import com.sun.net.httpserver.*;35import com.sun.net.httpserver.spi.*;3637class HttpsExchangeImpl extends HttpsExchange {3839ExchangeImpl impl;4041HttpsExchangeImpl (ExchangeImpl impl) throws IOException {42this.impl = impl;43}4445public Headers getRequestHeaders () {46return impl.getRequestHeaders();47}4849public Headers getResponseHeaders () {50return impl.getResponseHeaders();51}5253public URI getRequestURI () {54return impl.getRequestURI();55}5657public String getRequestMethod (){58return impl.getRequestMethod();59}6061public HttpContextImpl getHttpContext (){62return impl.getHttpContext();63}6465public void close () {66impl.close();67}6869public InputStream getRequestBody () {70return impl.getRequestBody();71}7273public int getResponseCode () {74return impl.getResponseCode();75}7677public OutputStream getResponseBody () {78return impl.getResponseBody();79}808182public void sendResponseHeaders (int rCode, long contentLen)83throws IOException84{85impl.sendResponseHeaders (rCode, contentLen);86}8788public InetSocketAddress getRemoteAddress (){89return impl.getRemoteAddress();90}9192public InetSocketAddress getLocalAddress (){93return impl.getLocalAddress();94}9596public String getProtocol (){97return impl.getProtocol();98}99100public SSLSession getSSLSession () {101return impl.getSSLSession ();102}103104public Object getAttribute (String name) {105return impl.getAttribute (name);106}107108public void setAttribute (String name, Object value) {109impl.setAttribute (name, value);110}111112public void setStreams (InputStream i, OutputStream o) {113impl.setStreams (i, o);114}115116public HttpPrincipal getPrincipal () {117return impl.getPrincipal();118}119120ExchangeImpl getExchangeImpl () {121return impl;122}123}124125126