-
- All Superinterfaces:
BasicAuthEndpoint
,org.refcodes.web.BasicAuthObserver
,org.refcodes.component.Closable
,org.refcodes.component.Closable.CloseBuilder<org.refcodes.component.LinkComponent.LinkComponentBuilder<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<org.refcodes.component.LinkComponent.LinkComponentBuilder<BasicAuthEndpointBuilder>>
,org.refcodes.component.OpenedAccessor
- All Known Implementing Classes:
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
ABasicAuthEndpointBuilder
extends anBasicAuthEndpoint
with builder functionality and addslambda
support for handling the requests addressed to thisBasicAuthEndpoint
. Thelambda
defined asBasicAuthObserver
acts as the single listener to thisBasicAuthEndpoint
responsible for handling the requests for which thisBasicAuthEndpoint
is responsible. The locator for which anBasicAuthEndpointBuilder
is responsible for is defined by theBasicAuthEndpointBuilder
'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 methodRestRequestEvent.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 methodRestRequestEvent.getWildcardReplacement(String)
. For ease of use, a named wildcard with single asterisk ("*") such as "${arg1}=*" can be abbreviated as "${arg1}".
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.component.Closable
org.refcodes.component.Closable.CloseAutomaton, org.refcodes.component.Closable.CloseBuilder<B extends org.refcodes.component.Closable.CloseBuilder<B>>
-
Nested classes/interfaces inherited from interface org.refcodes.component.ConnectionStatusAccessor
org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusMutator, org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusProperty
-
Nested classes/interfaces inherited from interface org.refcodes.web.HttpMethodAccessor
org.refcodes.web.HttpMethodAccessor.HttpMethodBuilder<B extends org.refcodes.web.HttpMethodAccessor.HttpMethodBuilder<B>>, org.refcodes.web.HttpMethodAccessor.HttpMethodMutator, org.refcodes.web.HttpMethodAccessor.HttpMethodProperty
-
Nested classes/interfaces inherited from interface org.refcodes.component.LinkComponent
org.refcodes.component.LinkComponent.LinkAutomaton, org.refcodes.component.LinkComponent.LinkComponentBuilder<B extends org.refcodes.component.LinkComponent.LinkComponentBuilder<B>>
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods 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 theBasicAuthObserver
to which any requests are delegated upon invocation of theBasicAuthObserver.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 theBasicAuthObserver
to which any requests are delegated upon invocation of theBasicAuthObserver.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 theBasicAuthObserver
.-
Methods inherited from interface org.refcodes.rest.BasicAuthEndpoint
getLocatorPathPattern
-
Methods inherited from interface org.refcodes.component.Closable
close, closeIn, closeQuietly, closeUnchecked
-
Methods inherited from interface org.refcodes.component.ConnectionStatusAccessor
getConnectionStatus, isOpened
-
Methods inherited from interface org.refcodes.web.HttpMethodAccessor.HttpMethodMutator
setHttpMethod
-
-
-
-
Method Detail
-
withHttpMethod
default BasicAuthEndpointBuilder withHttpMethod(org.refcodes.web.HttpMethod aHttpMethod)
- Specified by:
withHttpMethod
in interfaceorg.refcodes.web.HttpMethodAccessor.HttpMethodBuilder<BasicAuthEndpointBuilder>
-
withLocatorPathPattern
default BasicAuthEndpointBuilder withLocatorPathPattern(String aLocatorPathPattern)
Sets the resource locator as of the Builder-Pattern. The locator may contain wildcards as known from file-systems as follows: 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. 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 methodRestRequestEvent.getWildcardReplacement(String)
. For ease of use, a named wildcard with single asterisk ("*") such as "${arg1}=*" can be abbreviated as "${arg1}".- Parameters:
aLocatorPathPattern
- the locator pattern- Returns:
- The
BasicAuthEndpoint
builder to continue configuration (as of the Builder-Pattern).
-
setLocatorPathPattern
void setLocatorPathPattern(String aLocatorPathPattern)
Sets the resource locator. The locator may contain wildcards as known from file-systems as follows: 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. 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 methodRestRequestEvent.getWildcardReplacement(String)
. For ease of use, a named wildcard with single asterisk ("*") such as "${arg1}=*" can be abbreviated as "${arg1}".- Parameters:
aLocatorPathPattern
- the new locator pattern
-
getRequestObserver
org.refcodes.web.BasicAuthObserver getRequestObserver()
Retrieves theBasicAuthObserver
to which any requests are delegated upon invocation of theBasicAuthObserver.onBasicAuthRequest(java.net.InetSocketAddress, java.net.InetSocketAddress, HttpMethod, String, org.refcodes.web.BasicAuthCredentials, String)
method.- Returns:
- The (user defined)
BasicAuthObserver
to handle requests.
-
setRequestObserver
void setRequestObserver(org.refcodes.web.BasicAuthObserver aLambda)
Sets theBasicAuthObserver
to which any requests are delegated upon invocation of theBasicAuthObserver.onBasicAuthRequest(java.net.InetSocketAddress, java.net.InetSocketAddress, HttpMethod, String, org.refcodes.web.BasicAuthCredentials, String)
method.- Parameters:
aLambda
- The (user defined)BasicAuthObserver
to handle requests, feel free to code it aslambda
expression!
-
withRequestObserver
default BasicAuthEndpointBuilder withRequestObserver(org.refcodes.web.BasicAuthObserver aLambda)
Builder method for setting theBasicAuthObserver
.- Parameters:
aLambda
- The (user defined)BasicAuthObserver
to handle requests, feel free to code it aslambda
expression- Returns:
- The
BasicAuthEndpointBuilder
for the sake of a fluent API.
-
withOpen
default BasicAuthEndpointBuilder withOpen() throws IOException
- Specified by:
withOpen
in interfaceorg.refcodes.component.Openable.OpenBuilder<org.refcodes.component.LinkComponent.LinkComponentBuilder<BasicAuthEndpointBuilder>>
- Throws:
IOException
-
withClose
default BasicAuthEndpointBuilder withClose() throws IOException
- Specified by:
withClose
in interfaceorg.refcodes.component.Closable.CloseBuilder<org.refcodes.component.LinkComponent.LinkComponentBuilder<BasicAuthEndpointBuilder>>
- Throws:
IOException
-
withCloseQuietly
default BasicAuthEndpointBuilder withCloseQuietly()
- Specified by:
withCloseQuietly
in interfaceorg.refcodes.component.Closable.CloseBuilder<org.refcodes.component.LinkComponent.LinkComponentBuilder<BasicAuthEndpointBuilder>>
-
withCloseIn
default BasicAuthEndpointBuilder withCloseIn(int aCloseInMillis)
- Specified by:
withCloseIn
in interfaceorg.refcodes.component.Closable.CloseBuilder<org.refcodes.component.LinkComponent.LinkComponentBuilder<BasicAuthEndpointBuilder>>
-
build
static BasicAuthEndpointBuilder build()
This is a convenience method for easily instantiating the according builder.- Returns:
- an instance (using a default implementation) of this builder
-
-