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
WebAppEndpointInstances.- Author:
- K. Benedyczak
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AdvertisedAddressProviderprotected final NetworkServerFields inherited from class pl.edu.icm.unity.engine.api.endpoint.AbstractEndpoint
authenticationFlows, description, properties -
Constructor Summary
ConstructorsConstructorDescriptionAbstractWebEndpoint(NetworkServer httpServer, AdvertisedAddressProvider advertisedAddrProvider) -
Method Summary
Modifier and TypeMethodDescriptionfinal voiddestroy()Stops the endpoint.protected voidgetServletUrl(String servletPath) final voidstart()Starts the endpoint.protected voidMethods inherited from class pl.edu.icm.unity.engine.api.endpoint.AbstractEndpoint
getAuthenticationFlows, getEndpointDescription, getSerializedConfiguration, initialize, setAuthenticators, setSerializedConfigurationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface pl.edu.icm.unity.engine.api.endpoint.EndpointInstance
getAuthenticationFlows, getEndpointDescription, getSerializedConfiguration, initialize, updateAuthenticationFlowsMethods 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:EndpointInstanceStarts the endpoint. After this method returns the endpoint should be made available for usage.- Specified by:
startin interfaceEndpointInstance- Throws:
EngineException
-
startOverridable
protected void startOverridable() -
destroy
Description copied from interface:EndpointInstanceStops the endpoint.- Specified by:
destroyin interfaceEndpointInstance- Overrides:
destroyin classAbstractEndpoint- Throws:
EngineException
-
destroyOverridable
protected void destroyOverridable()
-