RingJavafor Ring

com.sun.net.httpserver

22 classes of the module jdk.httpserver.

Load them with:

using {
	"com.sun.net.httpserver"
}

All packages

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

MethodRing callJava overloads
getResponseCodegetResponseCode()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

MethodRing callJava overloads
getResponseCodegetResponseCode()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

MethodRing callJava overloads
getPrincipalgetPrincipal()HttpPrincipal getPrincipal()

The methods and fields of AuthenticatorResult are inherited.

BasicAuthenticator#

abstract · extends HttpserverAuthenticator · com.sun.net.httpserver.BasicAuthenticator

Methods

MethodRing callJava overloads
checkCredentialscheckCredentials(username,password)boolean checkCredentials(String username, String password)
getRealmgetRealm()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

MethodRing callJava overloads
doFilterdoFilter(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

MethodRing callJava 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)
addadd(key,value)void add(String key, String value)
clearclear()void clear()
computecompute(key,remappingFunction)Object compute(Object key, BiFunction remappingFunction)
computeIfAbsentcomputeIfAbsent(key,mappingFunction)Object computeIfAbsent(Object key, Function mappingFunction)
computeIfPresentcomputeIfPresent(key,remappingFunction)Object computeIfPresent(Object key, BiFunction remappingFunction)
containsKeycontainsKey(key)boolean containsKey(Object key)
containsValuecontainsValue(value)boolean containsValue(Object value)
entrySetentrySet()Set entrySet()
getFirstgetFirst(key)String getFirst(String key)
getOrDefaultgetOrDefault(key,defaultValue)Object getOrDefault(Object key, Object defaultValue)
isEmptyisEmpty()boolean isEmpty()
keySetkeySet()Set keySet()
mergemerge(key,value,remappingFunction)Object merge(Object key, Object value, BiFunction remappingFunction)
ofof(headers)static Headers of(Map headers)
static Headers of(String[] headers)
putAllputAll(t)void putAll(Map t)
putIfAbsentputIfAbsent(key,value)Object putIfAbsent(Object key, Object value)
removeremove(key)
remove([key,value])
remove([ :key = v, :value = v ])
List remove(Object key)
boolean remove(Object key, Object value)
replacereplace([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)
replaceAllreplaceAll(function)void replaceAll(BiFunction function)
setset(key,value)void set(String key, String value)
sizesize()int size()
valuesvalues()Collection values()

The methods and fields of Object are inherited.

HttpContext#

abstract · extends Object · com.sun.net.httpserver.HttpContext

Methods

MethodRing callJava overloads
getAttributesgetAttributes()Map getAttributes()
getAuthenticatorgetAuthenticator()Authenticator getAuthenticator()
getFiltersgetFilters()List getFilters()
getHandlergetHandler()HttpHandler getHandler()
getPathgetPath()String getPath()
getServergetServer()HttpServer getServer()
setAuthenticatorsetAuthenticator(auth)Authenticator setAuthenticator(Authenticator auth)
setHandlersetHandler(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

MethodRing callJava overloads
closeclose()void close()
getAttributegetAttribute(name)Object getAttribute(String name)
getHttpContextgetHttpContext()HttpContext getHttpContext()
getLocalAddressgetLocalAddress()InetSocketAddress getLocalAddress()
getPrincipalgetPrincipal()HttpPrincipal getPrincipal()
getProtocolgetProtocol()String getProtocol()
getRemoteAddressgetRemoteAddress()InetSocketAddress getRemoteAddress()
getRequestBodygetRequestBody()InputStream getRequestBody()
getRequestHeadersgetRequestHeaders()Headers getRequestHeaders()
getRequestMethodgetRequestMethod()String getRequestMethod()
getRequestURIgetRequestURI()URI getRequestURI()
getResponseBodygetResponseBody()OutputStream getResponseBody()
getResponseCodegetResponseCode()int getResponseCode()
getResponseHeadersgetResponseHeaders()Headers getResponseHeaders()
sendResponseHeaderssendResponseHeaders(rCode,responseLength)void sendResponseHeaders(int rCode, long responseLength)
setAttributesetAttribute(name,value)void setAttribute(String name, Object value)
setStreamssetStreams(i,o)void setStreams(InputStream i, OutputStream o)
withwith(headerName,headerValues)Request with(String headerName, List headerValues)

The methods and fields of Object are inherited.

HttpHandler#

interface · com.sun.net.httpserver.HttpHandler

Methods

MethodRing callJava overloads
handlehandle(exchange)void handle(HttpExchange exchange)

HttpHandlers#

class final · extends Object · com.sun.net.httpserver.HttpHandlers

Methods

MethodRing callJava overloads
handleOrElsehandleOrElse(handlerTest,handler,fallbackHandler)static HttpHandler handleOrElse(Predicate handlerTest, HttpHandler handler, HttpHandler fallbackHandler)
ofof(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

MethodRing callJava overloads
getNamegetName()String getName()
getRealmgetRealm()String getRealm()
getUsernamegetUsername()String getUsername()
impliesimplies(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

MethodRing callJava overloads
configureconfigure(params)void configure(HttpsParameters params)
getSSLContextgetSSLContext()SSLContext getSSLContext()

The methods and fields of Object are inherited.

HttpServer#

abstract · extends Object · com.sun.net.httpserver.HttpServer

Methods

MethodRing callJava 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)
bindbind(addr,backlog)void bind(InetSocketAddress addr, int backlog)
createcreate()static HttpServer create()
createContextcreateContext(path)
createContext([path,handler])
createContext([ :path = v, :handler = v ])
HttpContext createContext(String path)
HttpContext createContext(String path, HttpHandler handler)
getAddressgetAddress()InetSocketAddress getAddress()
getExecutorgetExecutor()Executor getExecutor()
removeContextremoveContext(context)void removeContext(HttpContext context)
void removeContext(String path)
setExecutorsetExecutor(executor)void setExecutor(Executor executor)
startstart()void start()
stopstop(delay)void stop(int delay)

The methods and fields of Object are inherited.

HttpserverAuthenticator#

abstract · extends Object · com.sun.net.httpserver.Authenticator

Methods

MethodRing callJava overloads
authenticateauthenticate(exch)Result authenticate(HttpExchange exch)

The methods and fields of Object are inherited.

HttpserverFilter#

abstract · extends Object · com.sun.net.httpserver.Filter

Methods

MethodRing callJava overloads
adaptRequestadaptRequest(description,requestOperator)static Filter adaptRequest(String description, UnaryOperator requestOperator)
afterHandlerafterHandler(description,operation)static Filter afterHandler(String description, Consumer operation)
beforeHandlerbeforeHandler(description,operation)static Filter beforeHandler(String description, Consumer operation)
descriptiondescription()String description()
doFilterdoFilter(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

MethodRing callJava overloads
getSSLSessiongetSSLSession()SSLSession getSSLSession()

The methods and fields of HttpExchange are inherited.

HttpsParameters#

abstract · extends Object · com.sun.net.httpserver.HttpsParameters

Methods

MethodRing callJava overloads
getCipherSuitesgetCipherSuites()String[] getCipherSuites()
getClientAddressgetClientAddress()InetSocketAddress getClientAddress()
getHttpsConfiguratorgetHttpsConfigurator()HttpsConfigurator getHttpsConfigurator()
getNeedClientAuthgetNeedClientAuth()boolean getNeedClientAuth()
getProtocolsgetProtocols()String[] getProtocols()
getWantClientAuthgetWantClientAuth()boolean getWantClientAuth()
setCipherSuitessetCipherSuites(cipherSuites)void setCipherSuites(String[] cipherSuites)
setNeedClientAuthsetNeedClientAuth(needClientAuth)void setNeedClientAuth(boolean needClientAuth)
setProtocolssetProtocols(protocols)void setProtocols(String[] protocols)
setSSLParameterssetSSLParameters(params)void setSSLParameters(SSLParameters params)
setWantClientAuthsetWantClientAuth(wantClientAuth)void setWantClientAuth(boolean wantClientAuth)

The methods and fields of Object are inherited.

HttpsServer#

abstract · extends HttpServer · com.sun.net.httpserver.HttpsServer

Methods

MethodRing callJava overloads
getHttpsConfiguratorgetHttpsConfigurator()HttpsConfigurator getHttpsConfigurator()
setHttpsConfiguratorsetHttpsConfigurator(config)void setHttpsConfigurator(HttpsConfigurator config)

The methods and fields of HttpServer are inherited.

Request#

interface · com.sun.net.httpserver.Request

Methods

MethodRing callJava overloads
getRequestHeadersgetRequestHeaders()Headers getRequestHeaders()
getRequestMethodgetRequestMethod()String getRequestMethod()
getRequestURIgetRequestURI()URI getRequestURI()
withwith(headerName,headerValues)Request with(String headerName, List headerValues)

SimpleFileServer#

class final · extends Object · com.sun.net.httpserver.SimpleFileServer

Methods

MethodRing callJava overloads
createFileHandlercreateFileHandler(rootDirectory)static HttpHandler createFileHandler(Path rootDirectory)
createFileServercreateFileServer(addr,rootDirectory,outputLevel)static HttpServer createFileServer(InetSocketAddress addr, Path rootDirectory, OutputLevel outputLevel)
createOutputFiltercreateOutputFilter(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

NameTypeAccessIn Ring
NONEOutputLevelconstant · statico.NONE
INFOOutputLevelconstant · statico.INFO
VERBOSEOutputLevelconstant · statico.VERBOSE

Methods

MethodRing callJava overloads
valueOfvalueOf(p1)
valueOf([enumClass,name])
valueOf([ :enumClass = v, :name = v ])
static OutputLevel valueOf(String p1)
static Enum valueOf(Class enumClass, String name)
valuesvalues()static OutputLevel[] values()

The methods and fields of Enum are inherited.

RingJava - use Java classes and methods from Ring programs.