1/* 2 * Copyright (c) 2005, 2006, Oracle and/or its affiliates. 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. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle 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 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. 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 com.sun.net.httpserver.*; 35import com.sun.net.httpserver.spi.*; 36 37class 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} 124