Path: blob/master/src/jdk.httpserver/share/classes/sun/net/httpserver/HttpsExchangeImpl.java
41159 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 com.sun.net.httpserver.*;34import com.sun.net.httpserver.spi.*;3536class HttpsExchangeImpl extends HttpsExchange {3738ExchangeImpl impl;3940HttpsExchangeImpl (ExchangeImpl impl) throws IOException {41this.impl = impl;42}4344public Headers getRequestHeaders () {45return impl.getRequestHeaders();46}4748public Headers getResponseHeaders () {49return impl.getResponseHeaders();50}5152public URI getRequestURI () {53return impl.getRequestURI();54}5556public String getRequestMethod (){57return impl.getRequestMethod();58}5960public HttpContextImpl getHttpContext (){61return impl.getHttpContext();62}6364public void close () {65impl.close();66}6768public InputStream getRequestBody () {69return impl.getRequestBody();70}7172public int getResponseCode () {73return impl.getResponseCode();74}7576public OutputStream getResponseBody () {77return impl.getResponseBody();78}798081public void sendResponseHeaders (int rCode, long contentLen)82throws IOException83{84impl.sendResponseHeaders (rCode, contentLen);85}8687public InetSocketAddress getRemoteAddress (){88return impl.getRemoteAddress();89}9091public InetSocketAddress getLocalAddress (){92return impl.getLocalAddress();93}9495public String getProtocol (){96return impl.getProtocol();97}9899public SSLSession getSSLSession () {100return impl.getSSLSession ();101}102103public Object getAttribute (String name) {104return impl.getAttribute (name);105}106107public void setAttribute (String name, Object value) {108impl.setAttribute (name, value);109}110111public void setStreams (InputStream i, OutputStream o) {112impl.setStreams (i, o);113}114115public HttpPrincipal getPrincipal () {116return impl.getPrincipal();117}118119ExchangeImpl getExchangeImpl () {120return impl;121}122}123124125