com.sun.net.httpserver
22 classes of the module jdk.httpserver.
Load them with:
using {
"com.sun.net.httpserver"
}
AuthenticatorFailure#
class · extends AuthenticatorResult · com.sun.net.httpserver.Authenticator$Failure
Constructors
new AuthenticatorFailure(int responseCode) |
Ring: new AuthenticatorFailure(args) uses the constructor with the fewest parameters (at least one); new AuthenticatorFailure makes the object with the constructor without parameters; the others: (new AuthenticatorFailure).@New([ :param = value ]) or .@New([v1,v2]).
Methods
| Method | Ring call | Java overloads |
|---|---|---|
getResponseCode | getResponseCode() | int getResponseCode() |
The methods and fields of AuthenticatorResult are inherited.
AuthenticatorResult#
abstract · extends Object · com.sun.net.httpserver.Authenticator$Result
The methods and fields of Object are inherited.
AuthenticatorRetry#
class · extends AuthenticatorResult · com.sun.net.httpserver.Authenticator$Retry
Constructors
new AuthenticatorRetry(int responseCode) |
Ring: new AuthenticatorRetry(args) uses the constructor with the fewest parameters (at least one); new AuthenticatorRetry makes the object with the constructor without parameters; the others: (new AuthenticatorRetry).@New([ :param = value ]) or .@New([v1,v2]).
Methods
| Method | Ring call | Java overloads |
|---|---|---|
getResponseCode | getResponseCode() | int getResponseCode() |
The methods and fields of AuthenticatorResult are inherited.
AuthenticatorSuccess#
class · extends AuthenticatorResult · com.sun.net.httpserver.Authenticator$Success
Constructors
new AuthenticatorSuccess(HttpPrincipal p) |
Ring: new AuthenticatorSuccess(args) uses the constructor with the fewest parameters (at least one); new AuthenticatorSuccess makes the object with the constructor without parameters; the others: (new AuthenticatorSuccess).@New([ :param = value ]) or .@New([v1,v2]).
Methods
| Method | Ring call | Java overloads |
|---|---|---|
getPrincipal | getPrincipal() | HttpPrincipal getPrincipal() |
The methods and fields of AuthenticatorResult are inherited.
BasicAuthenticator#
abstract · extends HttpserverAuthenticator · com.sun.net.httpserver.BasicAuthenticator
Methods
| Method | Ring call | Java overloads |
|---|---|---|
checkCredentials | checkCredentials(username,password) | boolean checkCredentials(String username, String password) |
getRealm | getRealm() | String getRealm() |
The methods and fields of HttpserverAuthenticator are inherited.
FilterChain#
class · extends Object · com.sun.net.httpserver.Filter$Chain
Constructors
new FilterChain(List filters, HttpHandler handler) |
Ring: new FilterChain(args) uses the constructor with the fewest parameters (at least one); new FilterChain makes the object with the constructor without parameters; the others: (new FilterChain).@New([ :param = value ]) or .@New([v1,v2]).
Methods
| Method | Ring call | Java overloads |
|---|---|---|
doFilter | doFilter(exchange) | void doFilter(HttpExchange exchange) |
The methods and fields of Object are inherited.
Headers#
class · extends Object · com.sun.net.httpserver.Headers
Implements: Map
Constructors
new Headers() |
new Headers(Map headers) |
Ring: new Headers(args) uses the constructor with the fewest parameters (at least one); new Headers makes the object with the constructor without parameters; the others: (new Headers).@New([ :param = value ]) or .@New([v1,v2]).
Methods
| Method | Ring call | Java overloads |
|---|---|---|
@forEach | @forEach(action) | void forEach(BiConsumer action) |
@get | @get(key) | List get(Object key) |
@put | @put(key,value) | List put(String key, List value) |
add | add(key,value) | void add(String key, String value) |
clear | clear() | void clear() |
compute | compute(key,remappingFunction) | Object compute(Object key, BiFunction remappingFunction) |
computeIfAbsent | computeIfAbsent(key,mappingFunction) | Object computeIfAbsent(Object key, Function mappingFunction) |
computeIfPresent | computeIfPresent(key,remappingFunction) | Object computeIfPresent(Object key, BiFunction remappingFunction) |
containsKey | containsKey(key) | boolean containsKey(Object key) |
containsValue | containsValue(value) | boolean containsValue(Object value) |
entrySet | entrySet() | Set entrySet() |
getFirst | getFirst(key) | String getFirst(String key) |
getOrDefault | getOrDefault(key,defaultValue) | Object getOrDefault(Object key, Object defaultValue) |
isEmpty | isEmpty() | boolean isEmpty() |
keySet | keySet() | Set keySet() |
merge | merge(key,value,remappingFunction) | Object merge(Object key, Object value, BiFunction remappingFunction) |
of | of(headers) | static Headers of(Map headers)static Headers of(String[] headers) |
putAll | putAll(t) | void putAll(Map t) |
putIfAbsent | putIfAbsent(key,value) | Object putIfAbsent(Object key, Object value) |
remove | remove(key)remove([key,value])remove([ :key = v, :value = v ]) | List remove(Object key)boolean remove(Object key, Object value) |
replace | replace([key,value])replace([ :key = v, :value = v ])replace([key,oldValue,newValue])replace([ :key = v, :oldValue = v, :newValue = v ]) | Object replace(Object key, Object value)boolean replace(Object key, Object oldValue, Object newValue) |
replaceAll | replaceAll(function) | void replaceAll(BiFunction function) |
set | set(key,value) | void set(String key, String value) |
size | size() | int size() |
values | values() | Collection values() |
The methods and fields of Object are inherited.
HttpContext#
abstract · extends Object · com.sun.net.httpserver.HttpContext
Methods
| Method | Ring call | Java overloads |
|---|---|---|
getAttributes | getAttributes() | Map getAttributes() |
getAuthenticator | getAuthenticator() | Authenticator getAuthenticator() |
getFilters | getFilters() | List getFilters() |
getHandler | getHandler() | HttpHandler getHandler() |
getPath | getPath() | String getPath() |
getServer | getServer() | HttpServer getServer() |
setAuthenticator | setAuthenticator(auth) | Authenticator setAuthenticator(Authenticator auth) |
setHandler | setHandler(handler) | void setHandler(HttpHandler handler) |
The methods and fields of Object are inherited.
HttpExchange#
abstract · extends Object · com.sun.net.httpserver.HttpExchange
Implements: AutoCloseable, Request
Methods
| Method | Ring call | Java overloads |
|---|---|---|
close | close() | void close() |
getAttribute | getAttribute(name) | Object getAttribute(String name) |
getHttpContext | getHttpContext() | HttpContext getHttpContext() |
getLocalAddress | getLocalAddress() | InetSocketAddress getLocalAddress() |
getPrincipal | getPrincipal() | HttpPrincipal getPrincipal() |
getProtocol | getProtocol() | String getProtocol() |
getRemoteAddress | getRemoteAddress() | InetSocketAddress getRemoteAddress() |
getRequestBody | getRequestBody() | InputStream getRequestBody() |
getRequestHeaders | getRequestHeaders() | Headers getRequestHeaders() |
getRequestMethod | getRequestMethod() | String getRequestMethod() |
getRequestURI | getRequestURI() | URI getRequestURI() |
getResponseBody | getResponseBody() | OutputStream getResponseBody() |
getResponseCode | getResponseCode() | int getResponseCode() |
getResponseHeaders | getResponseHeaders() | Headers getResponseHeaders() |
sendResponseHeaders | sendResponseHeaders(rCode,responseLength) | void sendResponseHeaders(int rCode, long responseLength) |
setAttribute | setAttribute(name,value) | void setAttribute(String name, Object value) |
setStreams | setStreams(i,o) | void setStreams(InputStream i, OutputStream o) |
with | with(headerName,headerValues) | Request with(String headerName, List headerValues) |
The methods and fields of Object are inherited.
HttpHandler#
interface · com.sun.net.httpserver.HttpHandler
Methods
| Method | Ring call | Java overloads |
|---|---|---|
handle | handle(exchange) | void handle(HttpExchange exchange) |
HttpHandlers#
class final · extends Object · com.sun.net.httpserver.HttpHandlers
Methods
| Method | Ring call | Java overloads |
|---|---|---|
handleOrElse | handleOrElse(handlerTest,handler,fallbackHandler) | static HttpHandler handleOrElse(Predicate handlerTest, HttpHandler handler, HttpHandler fallbackHandler) |
of | of(statusCode,headers,body) | static HttpHandler of(int statusCode, Headers headers, String body) |
The methods and fields of Object are inherited.
HttpPrincipal#
class · extends Object · com.sun.net.httpserver.HttpPrincipal
Implements: Principal
Constructors
new HttpPrincipal(String username, String realm) |
Ring: new HttpPrincipal(args) uses the constructor with the fewest parameters (at least one); new HttpPrincipal makes the object with the constructor without parameters; the others: (new HttpPrincipal).@New([ :param = value ]) or .@New([v1,v2]).
Methods
| Method | Ring call | Java overloads |
|---|---|---|
getName | getName() | String getName() |
getRealm | getRealm() | String getRealm() |
getUsername | getUsername() | String getUsername() |
implies | implies(subject) | boolean implies(Subject subject) |
The methods and fields of Object are inherited.
HttpsConfigurator#
class · extends Object · com.sun.net.httpserver.HttpsConfigurator
Constructors
new HttpsConfigurator(SSLContext context) |
Ring: new HttpsConfigurator(args) uses the constructor with the fewest parameters (at least one); new HttpsConfigurator makes the object with the constructor without parameters; the others: (new HttpsConfigurator).@New([ :param = value ]) or .@New([v1,v2]).
Methods
| Method | Ring call | Java overloads |
|---|---|---|
configure | configure(params) | void configure(HttpsParameters params) |
getSSLContext | getSSLContext() | SSLContext getSSLContext() |
The methods and fields of Object are inherited.
HttpServer#
abstract · extends Object · com.sun.net.httpserver.HttpServer
Methods
| Method | Ring call | Java overloads |
|---|---|---|
@create | @create([addr,backlog])@create([ :addr = v, :backlog = v ])@create([addr,backlog,path,handler,filters])@create([ :addr = v, :backlog = v, :path = v, :handler = v, :filters = v ]) | static HttpServer create(InetSocketAddress addr, int backlog)static HttpServer create(InetSocketAddress addr, int backlog, String path, HttpHandler handler, Filter[] filters) |
bind | bind(addr,backlog) | void bind(InetSocketAddress addr, int backlog) |
create | create() | static HttpServer create() |
createContext | createContext(path)createContext([path,handler])createContext([ :path = v, :handler = v ]) | HttpContext createContext(String path)HttpContext createContext(String path, HttpHandler handler) |
getAddress | getAddress() | InetSocketAddress getAddress() |
getExecutor | getExecutor() | Executor getExecutor() |
removeContext | removeContext(context) | void removeContext(HttpContext context)void removeContext(String path) |
setExecutor | setExecutor(executor) | void setExecutor(Executor executor) |
start | start() | void start() |
stop | stop(delay) | void stop(int delay) |
The methods and fields of Object are inherited.
HttpserverAuthenticator#
abstract · extends Object · com.sun.net.httpserver.Authenticator
Methods
| Method | Ring call | Java overloads |
|---|---|---|
authenticate | authenticate(exch) | Result authenticate(HttpExchange exch) |
The methods and fields of Object are inherited.
HttpserverFilter#
abstract · extends Object · com.sun.net.httpserver.Filter
Methods
| Method | Ring call | Java overloads |
|---|---|---|
adaptRequest | adaptRequest(description,requestOperator) | static Filter adaptRequest(String description, UnaryOperator requestOperator) |
afterHandler | afterHandler(description,operation) | static Filter afterHandler(String description, Consumer operation) |
beforeHandler | beforeHandler(description,operation) | static Filter beforeHandler(String description, Consumer operation) |
description | description() | String description() |
doFilter | doFilter(exchange,chain) | void doFilter(HttpExchange exchange, Chain chain) |
The methods and fields of Object are inherited.
HttpsExchange#
abstract · extends HttpExchange · com.sun.net.httpserver.HttpsExchange
Methods
| Method | Ring call | Java overloads |
|---|---|---|
getSSLSession | getSSLSession() | SSLSession getSSLSession() |
The methods and fields of HttpExchange are inherited.
HttpsParameters#
abstract · extends Object · com.sun.net.httpserver.HttpsParameters
Methods
| Method | Ring call | Java overloads |
|---|---|---|
getCipherSuites | getCipherSuites() | String[] getCipherSuites() |
getClientAddress | getClientAddress() | InetSocketAddress getClientAddress() |
getHttpsConfigurator | getHttpsConfigurator() | HttpsConfigurator getHttpsConfigurator() |
getNeedClientAuth | getNeedClientAuth() | boolean getNeedClientAuth() |
getProtocols | getProtocols() | String[] getProtocols() |
getWantClientAuth | getWantClientAuth() | boolean getWantClientAuth() |
setCipherSuites | setCipherSuites(cipherSuites) | void setCipherSuites(String[] cipherSuites) |
setNeedClientAuth | setNeedClientAuth(needClientAuth) | void setNeedClientAuth(boolean needClientAuth) |
setProtocols | setProtocols(protocols) | void setProtocols(String[] protocols) |
setSSLParameters | setSSLParameters(params) | void setSSLParameters(SSLParameters params) |
setWantClientAuth | setWantClientAuth(wantClientAuth) | void setWantClientAuth(boolean wantClientAuth) |
The methods and fields of Object are inherited.
HttpsServer#
abstract · extends HttpServer · com.sun.net.httpserver.HttpsServer
Methods
| Method | Ring call | Java overloads |
|---|---|---|
getHttpsConfigurator | getHttpsConfigurator() | HttpsConfigurator getHttpsConfigurator() |
setHttpsConfigurator | setHttpsConfigurator(config) | void setHttpsConfigurator(HttpsConfigurator config) |
The methods and fields of HttpServer are inherited.
Request#
interface · com.sun.net.httpserver.Request
Methods
| Method | Ring call | Java overloads |
|---|---|---|
getRequestHeaders | getRequestHeaders() | Headers getRequestHeaders() |
getRequestMethod | getRequestMethod() | String getRequestMethod() |
getRequestURI | getRequestURI() | URI getRequestURI() |
with | with(headerName,headerValues) | Request with(String headerName, List headerValues) |
SimpleFileServer#
class final · extends Object · com.sun.net.httpserver.SimpleFileServer
Methods
| Method | Ring call | Java overloads |
|---|---|---|
createFileHandler | createFileHandler(rootDirectory) | static HttpHandler createFileHandler(Path rootDirectory) |
createFileServer | createFileServer(addr,rootDirectory,outputLevel) | static HttpServer createFileServer(InetSocketAddress addr, Path rootDirectory, OutputLevel outputLevel) |
createOutputFilter | createOutputFilter(out,outputLevel) | static Filter createOutputFilter(OutputStream out, OutputLevel outputLevel) |
The methods and fields of Object are inherited.
SimpleFileServerOutputLevel#
enum · extends Enum · com.sun.net.httpserver.SimpleFileServer$OutputLevel
Fields
| Name | Type | Access | In Ring |
|---|---|---|---|
NONE | OutputLevel | constant · static | o.NONE |
INFO | OutputLevel | constant · static | o.INFO |
VERBOSE | OutputLevel | constant · static | o.VERBOSE |
Methods
| Method | Ring call | Java overloads |
|---|---|---|
valueOf | valueOf(p1)valueOf([enumClass,name])valueOf([ :enumClass = v, :name = v ]) | static OutputLevel valueOf(String p1)static Enum valueOf(Class enumClass, String name) |
values | values() | static OutputLevel[] values() |
The methods and fields of Enum are inherited.