public class HttpManagerBuilder extends Object
Manages the options for configuring a HttpManager. To use it just set properties on this class, then call init, then call buildHttpManager to get a reference to the HttpManager.
Note that this uses a two-step construction process: init() buildHttpManager()
The first step creates instances of any objects which have not been set and the second binds them onto the HttpManager. You might want to modify the objects created in the first step, eg setting properties on default implementations. Note that you should not modify the structure of the resultant object graph, because you could then end up with an inconsistent configuration
Where possible, default implementations are created when this class is constructed allowing them to be overwritten where needed. However this is only done for objects and values which are "leaf" nodes in the config object graph. This is to avoid inconsistent configuration where different parts of milton end up with different implementations of the same concern. For example, PropFind and PropPatch could end up using different property sources
| Modifier and Type | Class and Description |
|---|---|
static class |
HttpManagerBuilder.CreationException |
| Constructor and Description |
|---|
HttpManagerBuilder() |
protected List<InitListener> listeners
protected ResourceFactory mainResourceFactory
protected ResourceFactory outerResourceFactory
protected FileContentService fileContentService
protected DefaultHttp11ResponseHandler.BUFFERING buffering
protected List<AuthenticationHandler> authenticationHandlers
protected List<AuthenticationHandler> extraAuthenticationHandlers
protected List<AuthenticationHandler> cookieDelegateHandlers
protected DigestAuthenticationHandler digestHandler
protected BasicAuthHandler basicHandler
protected CookieAuthenticationHandler cookieAuthenticationHandler
protected FormAuthenticationHandler formAuthenticationHandler
protected int nonceValiditySeconds
protected NonceProvider nonceProvider
protected AuthenticationService authenticationService
protected ExpiredNonceRemover expiredNonceRemover
protected ResourceTypeHelper resourceTypeHelper
protected WebDavResponseHandler webdavResponseHandler
protected WebDavResponseHandler outerWebdavResponseHandler
protected ContentGenerator contentGenerator
protected CacheControlHelper cacheControlHelper
protected HandlerHelper handlerHelper
protected AuthorisationListener authorisationListener
protected ArrayList<HttpExtension> protocols
protected ProtocolHandlers protocolHandlers
protected EntityTransport entityTransport
protected EventManager eventManager
protected PropertyAuthoriser propertyAuthoriser
protected List<PropertySource> propertySources
protected List<PropertySource> extraPropertySources
protected ETagGenerator eTagGenerator
protected Http11ResponseHandler http11ResponseHandler
protected ValueWriters valueWriters
protected PropFindXmlGenerator propFindXmlGenerator
protected Filter defaultStandardFilter
protected UrlAdapter urlAdapter
protected QuotaDataAccessor quotaDataAccessor
protected PropPatchSetter propPatchSetter
protected boolean enableOptionsAuth
protected ResourceHandlerHelper resourceHandlerHelper
protected boolean initDone
protected boolean enableCompression
protected boolean enabledJson
protected boolean enableBasicAuth
protected boolean enableDigestAuth
protected boolean enableFormAuth
protected boolean enableCookieAuth
protected boolean enabledCkBrowser
protected boolean enableEarlyAuth
protected final boolean enableTextContentProperty
protected String loginPage
protected File rootDir
protected SecurityManager securityManager
protected String contextPath
protected String fsRealm
protected String defaultUser
protected String defaultPassword
protected UserAgentHelper userAgentHelper
protected MultiNamespaceCustomPropertySource multiNamespaceCustomPropertySource
protected boolean multiNamespaceCustomPropertySourceEnabled
protected BeanPropertySource beanPropertySource
protected WebDavProtocol webDavProtocol
protected DisplayNameFormatter displayNameFormatter
protected boolean webdavEnabled
protected MatchHelper matchHelper
protected PartialGetHelper partialGetHelper
protected LoginResponseHandler loginResponseHandler
protected LoginResponseHandler.LoginPageTypeHandler loginPageTypeHandler
protected boolean enableExpectContinue
protected String controllerPackagesToScan
protected String controllerClassNames
protected List controllers
protected SecurityManager securityManager()
public final void init()
protected void initCookieSigningKeys()
public HttpManager buildHttpManager()
protected void afterInit()
protected PropertyAuthoriser initPropertyAuthoriser()
protected List<PropertySource> initDefaultPropertySources(ResourceTypeHelper resourceTypeHelper)
protected BeanPropertySource initBeanPropertySource()
protected DefaultHttp11ResponseHandler createDefaultHttp11ResponseHandler(AuthenticationService authenticationService)
protected void buildResourceTypeHelper()
protected void buildProtocolHandlers(WebDavResponseHandler webdavResponseHandler, ResourceTypeHelper resourceTypeHelper)
protected void initWebdavProtocol()
protected PropFindRequestFieldParser propFindRequestFieldParser()
protected void buildOuterResourceFactory()
protected JsonResourceFactory buildJsonResourceFactory()
protected PropPatchSetter buildPatchSetter()
public DefaultHttp11ResponseHandler.BUFFERING getBuffering()
public void setBuffering(DefaultHttp11ResponseHandler.BUFFERING buffering)
public ResourceFactory getResourceFactory()
public void setResourceFactory(ResourceFactory resourceFactory)
public List<AuthenticationHandler> getAuthenticationHandlers()
public void setAuthenticationHandlers(List<AuthenticationHandler> authenticationHandlers)
public List<AuthenticationHandler> getExtraAuthenticationHandlers()
public void setExtraAuthenticationHandlers(List<AuthenticationHandler> extraAuthenticationHandlers)
public Map<UUID,Nonce> getNonces()
public ResourceFactory getMainResourceFactory()
public void setMainResourceFactory(ResourceFactory mainResourceFactory)
public ResourceFactory getOuterResourceFactory()
public void setOuterResourceFactory(ResourceFactory outerResourceFactory)
public int getNonceValiditySeconds()
public void setNonceValiditySeconds(int nonceValiditySeconds)
public NonceProvider getNonceProvider()
public void setNonceProvider(NonceProvider nonceProvider)
public AuthenticationService getAuthenticationService()
public void setAuthenticationService(AuthenticationService authenticationService)
public ExpiredNonceRemover getExpiredNonceRemover()
public void setExpiredNonceRemover(ExpiredNonceRemover expiredNonceRemover)
public ResourceTypeHelper getResourceTypeHelper()
public void setResourceTypeHelper(ResourceTypeHelper resourceTypeHelper)
public WebDavResponseHandler getWebdavResponseHandler()
public void setWebdavResponseHandler(WebDavResponseHandler webdavResponseHandler)
public HandlerHelper getHandlerHelper()
public void setHandlerHelper(HandlerHelper handlerHelper)
public ArrayList<HttpExtension> getProtocols()
public void setProtocols(ArrayList<HttpExtension> protocols)
public ProtocolHandlers getProtocolHandlers()
public void setProtocolHandlers(ProtocolHandlers protocolHandlers)
public EntityTransport getEntityTransport()
public void setEntityTransport(EntityTransport entityTransport)
public EventManager getEventManager()
public void setEventManager(EventManager eventManager)
public PropertyAuthoriser getPropertyAuthoriser()
public void setPropertyAuthoriser(PropertyAuthoriser propertyAuthoriser)
public List<PropertySource> getPropertySources()
public void setPropertySources(List<PropertySource> propertySources)
public ETagGenerator geteTagGenerator()
public void seteTagGenerator(ETagGenerator eTagGenerator)
public Http11ResponseHandler getHttp11ResponseHandler()
public void setHttp11ResponseHandler(Http11ResponseHandler http11ResponseHandler)
public ValueWriters getValueWriters()
public void setValueWriters(ValueWriters valueWriters)
public PropFindXmlGenerator getPropFindXmlGenerator()
public void setPropFindXmlGenerator(PropFindXmlGenerator propFindXmlGenerator)
public Filter getDefaultStandardFilter()
public void setDefaultStandardFilter(Filter defaultStandardFilter)
public UrlAdapter getUrlAdapter()
public void setUrlAdapter(UrlAdapter urlAdapter)
public QuotaDataAccessor getQuotaDataAccessor()
public void setQuotaDataAccessor(QuotaDataAccessor quotaDataAccessor)
public PropPatchSetter getPropPatchSetter()
public void setPropPatchSetter(PropPatchSetter propPatchSetter)
public boolean isInitDone()
public void setInitDone(boolean initDone)
public boolean isEnableOptionsAuth()
public void setEnableOptionsAuth(boolean enableOptionsAuth)
public boolean isEnableCompression()
public void setEnableCompression(boolean enableCompression)
public boolean isEnabledJson()
public void setEnabledJson(boolean enabledJson)
public List<PropertySource> getExtraPropertySources()
public void setExtraPropertySources(List<PropertySource> extraPropertySources)
protected void showLog(String propertyName, Object defaultedTo)
propertyName - defaultedTo - public boolean isEnableBasicAuth()
public void setEnableBasicAuth(boolean enableBasicAuth)
public boolean isEnableCookieAuth()
public void setEnableCookieAuth(boolean enableCookieAuth)
public boolean isEnableDigestAuth()
public void setEnableDigestAuth(boolean enableDigestAuth)
public boolean isEnableFormAuth()
public void setEnableFormAuth(boolean enableFormAuth)
public BasicAuthHandler getBasicHandler()
public void setBasicHandler(BasicAuthHandler basicHandler)
public OAuth2AuthenticationHandler getoAuth2Handler()
public void setoAuth2Handler(OAuth2AuthenticationHandler oAuth2Handler)
public CookieAuthenticationHandler getCookieAuthenticationHandler()
public void setCookieAuthenticationHandler(CookieAuthenticationHandler cookieAuthenticationHandler)
public List<AuthenticationHandler> getCookieDelegateHandlers()
public void setCookieDelegateHandlers(List<AuthenticationHandler> cookieDelegateHandlers)
public DigestAuthenticationHandler getDigestHandler()
public void setDigestHandler(DigestAuthenticationHandler digestHandler)
public OAuth2AuthenticationHandler getOAuth2Handler()
public void setOAuth2Handler(OAuth2AuthenticationHandler oAuth2Handler)
public boolean isEnableOAuth2()
public void setEnableOAuth2(boolean enableOAuth2)
public FormAuthenticationHandler getFormAuthenticationHandler()
public void setFormAuthenticationHandler(FormAuthenticationHandler formAuthenticationHandler)
public String getLoginPage()
public void setLoginPage(String loginPage)
public ResourceHandlerHelper getResourceHandlerHelper()
public void setResourceHandlerHelper(ResourceHandlerHelper resourceHandlerHelper)
public File getRootDir()
public void setRootDir(File rootDir)
public SecurityManager getSecurityManager()
public void setSecurityManager(SecurityManager securityManager)
public String getFsContextPath()
public void setFsContextPath(String fsContextPath)
public String getContextPath()
public void setContextPath(String contextPath)
public UserAgentHelper getUserAgentHelper()
public void setUserAgentHelper(UserAgentHelper userAgentHelper)
public String getDefaultPassword()
public void setDefaultPassword(String defaultPassword)
public String getDefaultUser()
public void setDefaultUser(String defaultUser)
public String getFsRealm()
public void setFsRealm(String fsRealm)
public void setMapOfNameAndPasswords(Map<String,String> mapOfNameAndPasswords)
public MultiNamespaceCustomPropertySource getMultiNamespaceCustomPropertySource()
public void setMultiNamespaceCustomPropertySource(MultiNamespaceCustomPropertySource multiNamespaceCustomPropertySource)
public BeanPropertySource getBeanPropertySource()
public void setBeanPropertySource(BeanPropertySource beanPropertySource)
public boolean isEnabledCkBrowser()
public void setEnabledCkBrowser(boolean enabledCkBrowser)
public WebDavProtocol getWebDavProtocol()
public void setWebDavProtocol(WebDavProtocol webDavProtocol)
public boolean isWebdavEnabled()
public void setWebdavEnabled(boolean webdavEnabled)
public MatchHelper getMatchHelper()
public void setMatchHelper(MatchHelper matchHelper)
public PartialGetHelper getPartialGetHelper()
public void setPartialGetHelper(PartialGetHelper partialGetHelper)
public boolean isMultiNamespaceCustomPropertySourceEnabled()
public void setMultiNamespaceCustomPropertySourceEnabled(boolean multiNamespaceCustomPropertySourceEnabled)
public LoginResponseHandler.LoginPageTypeHandler getLoginPageTypeHandler()
public void setLoginPageTypeHandler(LoginResponseHandler.LoginPageTypeHandler loginPageTypeHandler)
public LoginResponseHandler getLoginResponseHandler()
public void setLoginResponseHandler(LoginResponseHandler loginResponseHandler)
public List<InitListener> getListeners()
public void setListeners(List<InitListener> listeners)
public FileContentService getFileContentService()
public void setFileContentService(FileContentService fileContentService)
public CacheControlHelper getCacheControlHelper()
public void setCacheControlHelper(CacheControlHelper cacheControlHelper)
public ContentGenerator getContentGenerator()
public void setContentGenerator(ContentGenerator contentGenerator)
public void setEnableExpectContinue(boolean enableExpectContinue)
public boolean isEnableExpectContinue()
public WebDavResponseHandler getOuterWebdavResponseHandler()
public void setOuterWebdavResponseHandler(WebDavResponseHandler outerWebdavResponseHandler)
public String getControllerPackagesToScan()
public void setControllerPackagesToScan(String controllerPackagesToScan)
public String getControllerClassNames()
public void setControllerClassNames(String controlleClassNames)
public List getControllers()
public void setControllers(List controllers)
public boolean isEnableQuota()
public void setEnableQuota(boolean enableQuota)
public Long getMaxAgeSeconds()
public void setMaxAgeSeconds(Long maxAgeSeconds)
public DisplayNameFormatter getDisplayNameFormatter()
public void setDisplayNameFormatter(DisplayNameFormatter displayNameFormatter)
public String getFsHomeDir()
public void setFsHomeDir(String fsHomeDir)
public List<String> getCookieSigningKeys()
public void setUseLongLivedCookies(boolean useLongLivedCookies)
public boolean isUseLongLivedCookies()
public String getCookieSigningKeysFile()
public void setCookieSigningKeysFile(String cookieSigningKeysFile)
public PropFindPropertyBuilder getPropFindPropertyBuilder()
public void setPropFindPropertyBuilder(PropFindPropertyBuilder propFindPropertyBuilder)
public PropFindRequestFieldParser getPropFindRequestFieldParser()
public void setPropFindRequestFieldParser(PropFindRequestFieldParser propFindRequestFieldParser)
protected UserAgentHelper userAgentHelper()
protected PropFindPropertyBuilder propFindPropertyBuilder()
public RootContext getRootContext()
public List getDependencies()
public void setDependencies(List dependencies)
public boolean isEnableEarlyAuth()
public void setEnableEarlyAuth(boolean enableEarlyAuth)
public CacheManager getCacheManager()
public void setCacheManager(CacheManager cacheManager)
public AuthorisationListener getAuthorisationListener()
public void setAuthorisationListener(AuthorisationListener authorisationListener)
Copyright © 2021 McEvoy Software Ltd. All rights reserved.