Package org.refcodes.rest
Interface BasicAuthEndpointBuilder
-
- All Superinterfaces:
BasicAuthEndpoint,org.refcodes.net.BasicAuthObserver,org.refcodes.component.Closable,org.refcodes.component.Closable.CloseBuilder<BasicAuthEndpointBuilder>,org.refcodes.component.ConnectionStatusAccessor,org.refcodes.net.HttpMethodAccessor,org.refcodes.net.HttpMethodAccessor.HttpMethodBuilder<BasicAuthEndpointBuilder>,org.refcodes.net.HttpMethodAccessor.HttpMethodMutator,org.refcodes.net.HttpMethodAccessor.HttpMethodProperty,org.refcodes.component.LinkComponent,org.refcodes.component.LinkComponent.LinkComponentBuilder<BasicAuthEndpointBuilder>,org.refcodes.component.Openable,org.refcodes.component.Openable.OpenBuilder<BasicAuthEndpointBuilder>
- All Known Implementing Classes:
BasicAuthEndpointBuilderImpl
public interface BasicAuthEndpointBuilder extends BasicAuthEndpoint, org.refcodes.net.HttpMethodAccessor.HttpMethodProperty, org.refcodes.net.HttpMethodAccessor.HttpMethodBuilder<BasicAuthEndpointBuilder>, org.refcodes.component.LinkComponent.LinkComponentBuilder<BasicAuthEndpointBuilder>, org.refcodes.component.ConnectionStatusAccessor
ABasicAuthEndpointBuilderextends anBasicAuthEndpointwith builder functionality and addslambdasupport for handling the requests addressed to thisBasicAuthEndpoint. Thelambdadefined asBasicAuthObserveracts as the single listener to thisBasicAuthEndpointresponsible for handling the requests for which thisBasicAuthEndpointis responsible. The locator for which anBasicAuthEndpointBuilderis 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 methodWildcardSubstitutes.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 methodWildcardSubstitutes.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.net.HttpMethodAccessor
org.refcodes.net.HttpMethodAccessor.HttpMethodBuilder<B extends org.refcodes.net.HttpMethodAccessor.HttpMethodBuilder<B>>, org.refcodes.net.HttpMethodAccessor.HttpMethodMutator, org.refcodes.net.HttpMethodAccessor.HttpMethodProperty
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description org.refcodes.net.BasicAuthObservergetRequestObserver()Retrieves theBasicAuthObserverto which any requests are delegated upon invocation of theBasicAuthObserver.onBasicAuthRequest(java.net.InetSocketAddress, java.net.InetSocketAddress, HttpMethod, String, org.refcodes.net.BasicAuthCredentials, String)method.voidsetLocatorPattern(java.lang.String aLocatorPattern)Sets the resource locator.voidsetRequestObserver(org.refcodes.net.BasicAuthObserver aLambda)Sets theBasicAuthObserverto which any requests are delegated upon invocation of theBasicAuthObserver.onBasicAuthRequest(java.net.InetSocketAddress, java.net.InetSocketAddress, HttpMethod, String, org.refcodes.net.BasicAuthCredentials, String)method.default BasicAuthEndpointBuilderwithClose()default BasicAuthEndpointBuilderwithCloseIn(int aCloseInMillis)default BasicAuthEndpointBuilderwithCloseQuietly()default BasicAuthEndpointBuilderwithHttpMethod(org.refcodes.net.HttpMethod aHttpMethod)default BasicAuthEndpointBuilderwithLocatorPattern(java.lang.String aLocatorPattern)Sets the resource locator as of the Builder-Pattern.default BasicAuthEndpointBuilderwithOpen()default BasicAuthEndpointBuilderwithRequestObserver(org.refcodes.net.BasicAuthObserver aLambda)Builder method for setting theBasicAuthObserver.-
Methods inherited from interface org.refcodes.rest.BasicAuthEndpoint
getLocatorPattern
-
Methods inherited from interface org.refcodes.component.Closable
close, closeIn, closeQuietly, closeUnchecked
-
Methods inherited from interface org.refcodes.component.ConnectionStatusAccessor
getConnectionStatus, isConnectionOpened
-
-
-
-
Method Detail
-
withHttpMethod
default BasicAuthEndpointBuilder withHttpMethod(org.refcodes.net.HttpMethod aHttpMethod)
- Specified by:
withHttpMethodin interfaceorg.refcodes.net.HttpMethodAccessor.HttpMethodBuilder<BasicAuthEndpointBuilder>
-
withLocatorPattern
default BasicAuthEndpointBuilder withLocatorPattern(java.lang.String aLocatorPattern)
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 methodWildcardSubstitutes.getWildcardReplacement(String). For ease of use, a named wildcard with single asterisk ("*") such as "${arg1}=*" can be abbreviated as "${arg1}".- Parameters:
aLocatorPattern- the locator pattern- Returns:
- The
BasicAuthEndpointbuilder to continue configuration (as of the Builder-Pattern).
-
setLocatorPattern
void setLocatorPattern(java.lang.String aLocatorPattern)
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 methodWildcardSubstitutes.getWildcardReplacement(String). For ease of use, a named wildcard with single asterisk ("*") such as "${arg1}=*" can be abbreviated as "${arg1}".- Parameters:
aLocatorPattern- the new locator pattern
-
getRequestObserver
org.refcodes.net.BasicAuthObserver getRequestObserver()
Retrieves theBasicAuthObserverto which any requests are delegated upon invocation of theBasicAuthObserver.onBasicAuthRequest(java.net.InetSocketAddress, java.net.InetSocketAddress, HttpMethod, String, org.refcodes.net.BasicAuthCredentials, String)method.- Returns:
- The (user defined)
BasicAuthObserverto handle requests.
-
setRequestObserver
void setRequestObserver(org.refcodes.net.BasicAuthObserver aLambda)
Sets theBasicAuthObserverto which any requests are delegated upon invocation of theBasicAuthObserver.onBasicAuthRequest(java.net.InetSocketAddress, java.net.InetSocketAddress, HttpMethod, String, org.refcodes.net.BasicAuthCredentials, String)method.- Parameters:
aLambda- The (user defined)BasicAuthObserverto handle requests, feel free to code it aslambdaexpression!
-
withRequestObserver
default BasicAuthEndpointBuilder withRequestObserver(org.refcodes.net.BasicAuthObserver aLambda)
Builder method for setting theBasicAuthObserver.- Parameters:
aLambda- The (user defined)BasicAuthObserverto handle requests, feel free to code it aslambdaexpression- Returns:
- The
BasicAuthEndpointBuilderfor the sake of a fluent API.
-
withOpen
default BasicAuthEndpointBuilder withOpen() throws org.refcodes.component.OpenException
- Specified by:
withOpenin interfaceorg.refcodes.component.Openable.OpenBuilder<BasicAuthEndpointBuilder>- Throws:
org.refcodes.component.OpenException
-
withClose
default BasicAuthEndpointBuilder withClose() throws org.refcodes.component.CloseException
- Specified by:
withClosein interfaceorg.refcodes.component.Closable.CloseBuilder<BasicAuthEndpointBuilder>- Throws:
org.refcodes.component.CloseException
-
withCloseQuietly
default BasicAuthEndpointBuilder withCloseQuietly()
- Specified by:
withCloseQuietlyin interfaceorg.refcodes.component.Closable.CloseBuilder<BasicAuthEndpointBuilder>
-
withCloseIn
default BasicAuthEndpointBuilder withCloseIn(int aCloseInMillis)
- Specified by:
withCloseInin interfaceorg.refcodes.component.Closable.CloseBuilder<BasicAuthEndpointBuilder>
-
-