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 all
WebAppEndpointInstance
s.- Author:
- K. Benedyczak
-
Field Summary
Modifier and TypeFieldDescriptionprotected final AdvertisedAddressProvider
protected final NetworkServer
Fields inherited from class pl.edu.icm.unity.engine.api.endpoint.AbstractEndpoint
authenticationFlows, description, properties
-
Constructor Summary
ConstructorDescriptionAbstractWebEndpoint
(NetworkServer httpServer, AdvertisedAddressProvider advertisedAddrProvider) -
Method Summary
Modifier and TypeMethodDescriptionfinal void
destroy()
Stops the endpoint.protected void
getServletUrl
(String servletPath) final void
start()
Starts the endpoint.protected void
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 Details
-
httpServer
-
advertisedAddrProvider
-
-
Constructor Details
-
AbstractWebEndpoint
public AbstractWebEndpoint(NetworkServer httpServer, AdvertisedAddressProvider advertisedAddrProvider)
-
-
Method Details
-
getBaseUrl
- Returns:
- the URL where the server listens to. It has no path element.
-
getServletUrl
- 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
Description copied from interface:EndpointInstance
Starts the endpoint. After this method returns the endpoint should be made available for usage.- Specified by:
start
in interfaceEndpointInstance
- Throws:
EngineException
-
startOverridable
protected void startOverridable() -
destroy
Description copied from interface:EndpointInstance
Stops the endpoint.- Specified by:
destroy
in interfaceEndpointInstance
- Overrides:
destroy
in classAbstractEndpoint
- Throws:
EngineException
-
destroyOverridable
protected void destroyOverridable()
-