History

My first initial commit with all of mine experimental changes.

Dmitry Kabak (userdima committed 13 years ago

Commit d37b88d1 parent 3f5b46618352 files · +2598093 −-8690Browse files

Showing the changes to java/pkg/sun/net/httpserver/HttpsServerImpl.java (1 of 18352 files). Show all

Unified · Split

java/pkg/sun/net/httpserver/HttpsServerImpl.java+100−0
@@ -0,0 +1,100 @@
1/*
2 * Copyright (c) 2005, 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.net.*;
29import java.io.*;
30import java.nio.*;
31import java.security.*;
32import java.nio.channels.*;
33import java.util.*;
34import java.util.concurrent.*;
35import javax.net.ssl.*;
36import com.sun.net.httpserver.*;
37import com.sun.net.httpserver.spi.*;
38
39public class HttpsServerImpl extends HttpsServer {
40
41 ServerImpl server;
42
43 HttpsServerImpl () throws IOException {
44 this (new InetSocketAddress(443), 0);
45 }
46
47 HttpsServerImpl (
48 InetSocketAddress addr, int backlog
49 ) throws IOException {
50 server = new ServerImpl (this, "https", addr, backlog);
51 }
52
53 public void setHttpsConfigurator (HttpsConfigurator config) {
54 server.setHttpsConfigurator (config);
55 }
56
57 public HttpsConfigurator getHttpsConfigurator () {
58 return server.getHttpsConfigurator();
59 }
60
61 public void bind (InetSocketAddress addr, int backlog) throws IOException {
62 server.bind (addr, backlog);
63 }
64
65 public void start () {
66 server.start();
67 }
68
69 public void setExecutor (Executor executor) {
70 server.setExecutor(executor);
71 }
72
73 public Executor getExecutor () {
74 return server.getExecutor();
75 }
76
77 public void stop (int delay) {
78 server.stop (delay);
79 }
80
81 public HttpContextImpl createContext (String path, HttpHandler handler) {
82 return server.createContext (path, handler);
83 }
84
85 public HttpContextImpl createContext (String path) {
86 return server.createContext (path);
87 }
88
89 public void removeContext (String path) throws IllegalArgumentException {
90 server.removeContext (path);
91 }
92
93 public void removeContext (HttpContext context) throws IllegalArgumentException {
94 server.removeContext (context);
95 }
96
97 public InetSocketAddress getAddress() {
98 return server.getAddress();
99 }
100}