Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
JDK 11 jdk.httpserver.jmod - HTTP Server Module
JDK 11 jdk.httpserver.jmod is the JMOD file for JDK 11 HTTP Server module.
JDK 11 HTTP Server module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\jdk.httpserver.jmod.
JDK 11 HTTP Server module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 HTTP Server module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\jdk.httpserver.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ sun/net/httpserver/HttpConnection.java
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package sun.net.httpserver;
import java.io.*;
import javax.net.ssl.*;
import java.nio.channels.*;
import java.lang.System.Logger;
import java.lang.System.Logger.Level;
import com.sun.net.httpserver.*;
import com.sun.net.httpserver.spi.*;
/**
* encapsulates all the connection specific state for a HTTP/S connection
* one of these is hung from the selector attachment and is used to locate
* everything from that.
*/
class HttpConnection {
HttpContextImpl context;
SSLEngine engine;
SSLContext sslContext;
SSLStreams sslStreams;
/* high level streams returned to application */
InputStream i;
/* low level stream that sits directly over channel */
InputStream raw;
OutputStream rawout;
SocketChannel chan;
SelectionKey selectionKey;
String protocol;
long time;
volatile long creationTime; // time this connection was created
volatile long rspStartedTime; // time we started writing the response
int remaining;
boolean closed = false;
Logger logger;
public enum State {IDLE, REQUEST, RESPONSE};
volatile State state;
public String toString() {
String s = null;
if (chan != null) {
s = chan.toString();
}
return s;
}
HttpConnection () {
}
void setChannel (SocketChannel c) {
chan = c;
}
void setContext (HttpContextImpl ctx) {
context = ctx;
}
State getState() {
return state;
}
void setState (State s) {
state = s;
}
void setParameters (
InputStream in, OutputStream rawout, SocketChannel chan,
SSLEngine engine, SSLStreams sslStreams, SSLContext sslContext, String protocol,
HttpContextImpl context, InputStream raw
)
{
this.context = context;
this.i = in;
this.rawout = rawout;
this.raw = raw;
this.protocol = protocol;
this.engine = engine;
this.chan = chan;
this.sslContext = sslContext;
this.sslStreams = sslStreams;
this.logger = context.getLogger();
}
SocketChannel getChannel () {
return chan;
}
synchronized void close () {
if (closed) {
return;
}
closed = true;
if (logger != null && chan != null) {
logger.log (Level.TRACE, "Closing connection: " + chan.toString());
}
if (!chan.isOpen()) {
ServerImpl.dprint ("Channel already closed");
return;
}
try {
/* need to ensure temporary selectors are closed */
if (raw != null) {
raw.close();
}
} catch (IOException e) {
ServerImpl.dprint (e);
}
try {
if (rawout != null) {
rawout.close();
}
} catch (IOException e) {
ServerImpl.dprint (e);
}
try {
if (sslStreams != null) {
sslStreams.close();
}
} catch (IOException e) {
ServerImpl.dprint (e);
}
try {
chan.close();
} catch (IOException e) {
ServerImpl.dprint (e);
}
}
/* remaining is the number of bytes left on the lowest level inputstream
* after the exchange is finished
*/
void setRemaining (int r) {
remaining = r;
}
int getRemaining () {
return remaining;
}
SelectionKey getSelectionKey () {
return selectionKey;
}
InputStream getInputStream () {
return i;
}
OutputStream getRawOutputStream () {
return rawout;
}
String getProtocol () {
return protocol;
}
SSLEngine getSSLEngine () {
return engine;
}
SSLContext getSSLContext () {
return sslContext;
}
HttpContextImpl getHttpContext () {
return context;
}
}
⏎ sun/net/httpserver/HttpConnection.java
Or download all of them as a single archive file:
File name: jdk.httpserver-11.0.1-src.zip File size: 66350 bytes Release date: 2018-11-04 Download
⇒ JDK 11 jdk.internal.ed.jmod - Internal Editor Module
2020-02-29, ≈22🔥, 0💬
Popular Posts:
ZooKeeper is a centralized service for maintaining configuration information, naming, providing dist...
JDK 17 java.rmi.jmod is the JMOD file for JDK 17 RMI (Remote Method Invocation) module. JDK 17 RMI m...
How to display types defined in an XML Schema file with the xs\QueryXS.java provided in the Apache X...
This package is the backport of java.util.concurrent API, introduced in Java 5.0 and further refined...
commons-fileupload-1.3.3 -sources.jaris the source JAR file for Apache Commons FileUpload 1.3., whic...