BasicAuthEndpoint
, org.refcodes.web.BasicAuthObserver
, org.refcodes.component.Closable
, org.refcodes.component.Closable.CloseBuilder<BasicAuthEndpointBuilder>
, org.refcodes.component.ConnectionStatusAccessor
, org.refcodes.web.HttpMethodAccessor
, org.refcodes.web.HttpMethodAccessor.HttpMethodBuilder<BasicAuthEndpointBuilder>
, org.refcodes.web.HttpMethodAccessor.HttpMethodMutator
, org.refcodes.web.HttpMethodAccessor.HttpMethodProperty
, org.refcodes.component.LinkComponent
, org.refcodes.component.LinkComponent.LinkComponentBuilder<BasicAuthEndpointBuilder>
, org.refcodes.component.Openable
, org.refcodes.component.Openable.OpenBuilder<BasicAuthEndpointBuilder>
, org.refcodes.component.OpenedAccessor
BasicAuthEndpointBuilderImpl
public interface BasicAuthEndpointBuilder extends BasicAuthEndpoint, org.refcodes.web.HttpMethodAccessor.HttpMethodProperty, org.refcodes.web.HttpMethodAccessor.HttpMethodBuilder<BasicAuthEndpointBuilder>, org.refcodes.component.LinkComponent.LinkComponentBuilder<BasicAuthEndpointBuilder>, org.refcodes.component.ConnectionStatusAccessor
BasicAuthEndpointBuilder
extends an BasicAuthEndpoint
with
builder functionality and adds lambda
support for handling the
requests addressed to this BasicAuthEndpoint
. The lambda
defined as BasicAuthObserver
acts as the single listener to this
BasicAuthEndpoint
responsible for handling the requests for which
this BasicAuthEndpoint
is responsible. The locator for which an
BasicAuthEndpointBuilder
is responsible for is defined by the
BasicAuthEndpointBuilder
's Locator-Pattern: A single asterisk ("*")
matches zero or more characters within a locator name. A double asterisk
("**") matches zero or more characters across directory levels. A question
mark ("?") matches exactly one character within a locator name. The single
asterisk ("*"), the double asterisk ("**") and the question mark ("?") we
refer to as wildcard: You get an array with the substitutes of the wildcards
using the method RestRequestEvent.getWildcardReplacements()
. You may
name a wildcard by prefixing it with "${someWildcardName}". For example a
named wildcard may look as follows: "${arg1}=*" or "${arg2}=**" or
"${arg3}=?". You can get the text substituting a named wildcard using the
method RestRequestEvent.getWildcardReplacement(String)
. For ease of
use, a named wildcard with single asterisk ("*") such as "${arg1}=*" can be
abbreviated as "${arg1}".org.refcodes.component.Closable.CloseAutomaton, org.refcodes.component.Closable.CloseBuilder<B extends org.refcodes.component.Closable.CloseBuilder<B>>
org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusMutator, org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusProperty
org.refcodes.web.HttpMethodAccessor.HttpMethodBuilder<B extends org.refcodes.web.HttpMethodAccessor.HttpMethodBuilder<B>>, org.refcodes.web.HttpMethodAccessor.HttpMethodMutator, org.refcodes.web.HttpMethodAccessor.HttpMethodProperty
org.refcodes.component.LinkComponent.LinkAutomaton, org.refcodes.component.LinkComponent.LinkComponentBuilder<B extends org.refcodes.component.LinkComponent.LinkComponentBuilder<B>>
Modifier and Type | Method | Description |
---|---|---|
static BasicAuthEndpointBuilder |
build() |
This is a convenience method for easily instantiating the according
builder.
|
org.refcodes.web.BasicAuthObserver |
getRequestObserver() |
Retrieves the
BasicAuthObserver to which any requests are
delegated upon invocation of the
BasicAuthObserver.onBasicAuthRequest(java.net.InetSocketAddress, java.net.InetSocketAddress, HttpMethod, String, org.refcodes.web.BasicAuthCredentials, String)
method. |
void |
setLocatorPathPattern(String aLocatorPathPattern) |
Sets the resource locator.
|
void |
setRequestObserver(org.refcodes.web.BasicAuthObserver aLambda) |
Sets the
BasicAuthObserver to which any requests are delegated
upon invocation of the
BasicAuthObserver.onBasicAuthRequest(java.net.InetSocketAddress, java.net.InetSocketAddress, HttpMethod, String, org.refcodes.web.BasicAuthCredentials, String)
method. |
default BasicAuthEndpointBuilder |
withClose() |
|
default BasicAuthEndpointBuilder |
withCloseIn(int aCloseInMillis) |
|
default BasicAuthEndpointBuilder |
withCloseQuietly() |
|
default BasicAuthEndpointBuilder |
withHttpMethod(org.refcodes.web.HttpMethod aHttpMethod) |
|
default BasicAuthEndpointBuilder |
withLocatorPathPattern(String aLocatorPathPattern) |
Sets the resource locator as of the Builder-Pattern.
|
default BasicAuthEndpointBuilder |
withOpen() |
|
default BasicAuthEndpointBuilder |
withRequestObserver(org.refcodes.web.BasicAuthObserver aLambda) |
Builder method for setting the
BasicAuthObserver . |
getLocatorPathPattern
close, closeIn, closeQuietly, closeUnchecked
getConnectionStatus, isOpened
setHttpMethod
default BasicAuthEndpointBuilder withHttpMethod(org.refcodes.web.HttpMethod aHttpMethod)
withHttpMethod
in interface org.refcodes.web.HttpMethodAccessor.HttpMethodBuilder<BasicAuthEndpointBuilder>
default BasicAuthEndpointBuilder withLocatorPathPattern(String aLocatorPathPattern)
RestRequestEvent.getWildcardReplacement(String)
. For ease of use,
a named wildcard with single asterisk ("*") such as "${arg1}=*" can be
abbreviated as "${arg1}".aLocatorPathPattern
- the locator patternBasicAuthEndpoint
builder to continue configuration
(as of the Builder-Pattern).void setLocatorPathPattern(String aLocatorPathPattern)
RestRequestEvent.getWildcardReplacement(String)
. For ease of use,
a named wildcard with single asterisk ("*") such as "${arg1}=*" can be
abbreviated as "${arg1}".aLocatorPathPattern
- the new locator patternorg.refcodes.web.BasicAuthObserver getRequestObserver()
BasicAuthObserver
to which any requests are
delegated upon invocation of the
BasicAuthObserver.onBasicAuthRequest(java.net.InetSocketAddress, java.net.InetSocketAddress, HttpMethod, String, org.refcodes.web.BasicAuthCredentials, String)
method.BasicAuthObserver
to handle requests.void setRequestObserver(org.refcodes.web.BasicAuthObserver aLambda)
BasicAuthObserver
to which any requests are delegated
upon invocation of the
BasicAuthObserver.onBasicAuthRequest(java.net.InetSocketAddress, java.net.InetSocketAddress, HttpMethod, String, org.refcodes.web.BasicAuthCredentials, String)
method.aLambda
- The (user defined) BasicAuthObserver
to handle
requests, feel free to code it as lambda
expression!default BasicAuthEndpointBuilder withRequestObserver(org.refcodes.web.BasicAuthObserver aLambda)
BasicAuthObserver
.aLambda
- The (user defined) BasicAuthObserver
to handle
requests, feel free to code it as lambda
expressionBasicAuthEndpointBuilder
for the sake of a fluent
API.default BasicAuthEndpointBuilder withOpen() throws IOException
withOpen
in interface org.refcodes.component.Openable.OpenBuilder<BasicAuthEndpointBuilder>
IOException
default BasicAuthEndpointBuilder withClose() throws IOException
withClose
in interface org.refcodes.component.Closable.CloseBuilder<BasicAuthEndpointBuilder>
IOException
default BasicAuthEndpointBuilder withCloseQuietly()
withCloseQuietly
in interface org.refcodes.component.Closable.CloseBuilder<BasicAuthEndpointBuilder>
default BasicAuthEndpointBuilder withCloseIn(int aCloseInMillis)
withCloseIn
in interface org.refcodes.component.Closable.CloseBuilder<BasicAuthEndpointBuilder>
static BasicAuthEndpointBuilder build()
Copyright © 2021. All rights reserved.