001: /*
002: * Copyright 2005 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.net.*;
029: import java.io.*;
030: import java.nio.*;
031: import java.security.*;
032: import java.nio.channels.*;
033: import java.util.*;
034: import java.util.concurrent.*;
035: import javax.net.ssl.*;
036: import com.sun.net.httpserver.*;
037: import com.sun.net.httpserver.spi.*;
038:
039: public class HttpsServerImpl extends HttpsServer {
040:
041: ServerImpl server;
042:
043: HttpsServerImpl() throws IOException {
044: this (new InetSocketAddress(443), 0);
045: }
046:
047: HttpsServerImpl(InetSocketAddress addr, int backlog)
048: throws IOException {
049: server = new ServerImpl(this , "https", addr, backlog);
050: }
051:
052: public void setHttpsConfigurator(HttpsConfigurator config) {
053: server.setHttpsConfigurator(config);
054: }
055:
056: public HttpsConfigurator getHttpsConfigurator() {
057: return server.getHttpsConfigurator();
058: }
059:
060: public void bind(InetSocketAddress addr, int backlog)
061: throws IOException {
062: server.bind(addr, backlog);
063: }
064:
065: public void start() {
066: server.start();
067: }
068:
069: public void setExecutor(Executor executor) {
070: server.setExecutor(executor);
071: }
072:
073: public Executor getExecutor() {
074: return server.getExecutor();
075: }
076:
077: public void stop(int delay) {
078: server.stop(delay);
079: }
080:
081: public HttpContextImpl createContext(String path,
082: HttpHandler handler) {
083: return server.createContext(path, handler);
084: }
085:
086: public HttpContextImpl createContext(String path) {
087: return server.createContext(path);
088: }
089:
090: public void removeContext(String path)
091: throws IllegalArgumentException {
092: server.removeContext(path);
093: }
094:
095: public void removeContext(HttpContext context)
096: throws IllegalArgumentException {
097: server.removeContext(context);
098: }
099:
100: public InetSocketAddress getAddress() {
101: return server.getAddress();
102: }
103: }
|