001: /*
002: * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
003: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004: *
005: * This code is free software; you can redistribute it and/or modify it
006: * under the terms of the GNU General Public License version 2 only, as
007: * published by the Free Software Foundation. Sun designates this
008: * particular file as subject to the "Classpath" exception as provided
009: * by Sun in the LICENSE file that accompanied this code.
010: *
011: * This code is distributed in the hope that it will be useful, but WITHOUT
012: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
014: * version 2 for more details (a copy is included in the LICENSE file that
015: * accompanied this code).
016: *
017: * You should have received a copy of the GNU General Public License version
018: * 2 along with this work; if not, write to the Free Software Foundation,
019: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020: *
021: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
022: * CA 95054 USA or visit www.sun.com if you need additional information or
023: * have any questions.
024: */
025:
026: package sun.net.httpserver;
027:
028: import java.io.*;
029: import java.nio.*;
030: import java.nio.channels.*;
031: import java.net.*;
032: import javax.net.ssl.*;
033: import java.util.*;
034: import sun.net.www.MessageHeader;
035: import com.sun.net.httpserver.*;
036: import com.sun.net.httpserver.spi.*;
037:
038: class HttpsExchangeImpl extends HttpsExchange {
039:
040: ExchangeImpl impl;
041:
042: HttpsExchangeImpl(ExchangeImpl impl) throws IOException {
043: this .impl = impl;
044: }
045:
046: public Headers getRequestHeaders() {
047: return impl.getRequestHeaders();
048: }
049:
050: public Headers getResponseHeaders() {
051: return impl.getResponseHeaders();
052: }
053:
054: public URI getRequestURI() {
055: return impl.getRequestURI();
056: }
057:
058: public String getRequestMethod() {
059: return impl.getRequestMethod();
060: }
061:
062: public HttpContextImpl getHttpContext() {
063: return impl.getHttpContext();
064: }
065:
066: public void close() {
067: impl.close();
068: }
069:
070: public InputStream getRequestBody() {
071: return impl.getRequestBody();
072: }
073:
074: public int getResponseCode() {
075: return impl.getResponseCode();
076: }
077:
078: public OutputStream getResponseBody() {
079: return impl.getResponseBody();
080: }
081:
082: public void sendResponseHeaders(int rCode, long contentLen)
083: throws IOException {
084: impl.sendResponseHeaders(rCode, contentLen);
085: }
086:
087: public InetSocketAddress getRemoteAddress() {
088: return impl.getRemoteAddress();
089: }
090:
091: public InetSocketAddress getLocalAddress() {
092: return impl.getLocalAddress();
093: }
094:
095: public String getProtocol() {
096: return impl.getProtocol();
097: }
098:
099: public SSLSession getSSLSession() {
100: return impl.getSSLSession();
101: }
102:
103: public Object getAttribute(String name) {
104: return impl.getAttribute(name);
105: }
106:
107: public void setAttribute(String name, Object value) {
108: impl.setAttribute(name, value);
109: }
110:
111: public void setStreams(InputStream i, OutputStream o) {
112: impl.setStreams(i, o);
113: }
114:
115: public HttpPrincipal getPrincipal() {
116: return impl.getPrincipal();
117: }
118:
119: ExchangeImpl getExchangeImpl() {
120: return impl;
121: }
122: }
|