Class AbstractWebEndpoint
- java.lang.Object
-
- pl.edu.icm.unity.engine.api.endpoint.AbstractEndpoint
-
- pl.edu.icm.unity.engine.api.endpoint.AbstractWebEndpoint
-
- All Implemented Interfaces:
EndpointInstance,WebAppEndpointInstance
public abstract class AbstractWebEndpoint extends AbstractEndpoint implements WebAppEndpointInstance
Typical boilerplate for allWebAppEndpointInstances.- Author:
- K. Benedyczak
-
-
Field Summary
Fields Modifier and Type Field Description protected AdvertisedAddressProvideradvertisedAddrProviderprotected NetworkServerhttpServer-
Fields inherited from class pl.edu.icm.unity.engine.api.endpoint.AbstractEndpoint
authenticationFlows, description, properties
-
-
Constructor Summary
Constructors Constructor Description AbstractWebEndpoint(NetworkServer httpServer, AdvertisedAddressProvider advertisedAddrProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()Stops the endpoint.protected voiddestroyOverridable()java.net.URLgetBaseUrl()java.lang.StringgetServletUrl(java.lang.String servletPath)voidstart()Starts the endpoint.protected voidstartOverridable()-
Methods inherited from class pl.edu.icm.unity.engine.api.endpoint.AbstractEndpoint
getAuthenticationFlows, getEndpointDescription, getSerializedConfiguration, initialize, setAuthenticators, setSerializedConfiguration
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface pl.edu.icm.unity.engine.api.endpoint.EndpointInstance
getAuthenticationFlows, getEndpointDescription, getSerializedConfiguration, initialize, updateAuthenticationFlows
-
Methods inherited from interface pl.edu.icm.unity.engine.api.endpoint.WebAppEndpointInstance
getServletContextHandler
-
-
-
-
Field Detail
-
httpServer
protected final NetworkServer httpServer
-
advertisedAddrProvider
protected final AdvertisedAddressProvider advertisedAddrProvider
-
-
Constructor Detail
-
AbstractWebEndpoint
public AbstractWebEndpoint(NetworkServer httpServer, AdvertisedAddressProvider advertisedAddrProvider)
-
-
Method Detail
-
getBaseUrl
public java.net.URL getBaseUrl()
- Returns:
- the URL where the server listens to. It has no path element.
-
getServletUrl
public java.lang.String getServletUrl(java.lang.String servletPath)
- Parameters:
servletPath- path of the servlet exposing the endpoint, Only the servlet's path, without context prefix.- Returns:
- URL in string form, including the servers address, context address and the servlet's address.
-
start
public final void start() throws pl.edu.icm.unity.exceptions.EngineExceptionDescription copied from interface:EndpointInstanceStarts the endpoint. After this method returns the endpoint should be made available for usage.- Specified by:
startin interfaceEndpointInstance- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
startOverridable
protected void startOverridable()
-
destroy
public final void destroy() throws pl.edu.icm.unity.exceptions.EngineExceptionDescription copied from interface:EndpointInstanceStops the endpoint.- Specified by:
destroyin interfaceEndpointInstance- Overrides:
destroyin classAbstractEndpoint- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
destroyOverridable
protected void destroyOverridable()
-
-