Package com.peterphi.std.guice.web.rest
Class CoreRestServicesModule
java.lang.Object
com.google.inject.AbstractModule
com.peterphi.std.guice.web.rest.CoreRestServicesModule
- All Implemented Interfaces:
com.google.inject.Module
public class CoreRestServicesModule
extends com.google.inject.AbstractModule
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Servlet context value to read for the resteasy prefix -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
getRestServicesEndpoint
(LocalEndpointDiscovery localEndpointDiscovery) Return the base path for this webappgetRestServicesEndpoint
(URI webappUri, String restPrefix, javax.servlet.ServletContext context) Return the base path for all REST services in this webappgetRestServicesPrefix
(javax.servlet.ServletContext context) Retrieves the RESTeasy mapping prefix - this is the path under the webapp root where RESTeasy services are mapped.Methods inherited from class com.google.inject.AbstractModule
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding
-
Field Details
-
RESTEASY_MAPPING_PREFIX
Servlet context value to read for the resteasy prefix- See Also:
-
-
Constructor Details
-
CoreRestServicesModule
public CoreRestServicesModule()
-
-
Method Details
-
configure
protected void configure()- Overrides:
configure
in classcom.google.inject.AbstractModule
-
getRestServicesPrefix
Retrieves the RESTeasy mapping prefix - this is the path under the webapp root where RESTeasy services are mapped.- Parameters:
context
-- Returns:
-
getRestServicesEndpoint
@Provides public URI getRestServicesEndpoint(URI webappUri, String restPrefix, javax.servlet.ServletContext context) Return the base path for all REST services in this webapp- Parameters:
webappUri
-restPrefix
- the prefix for rest services (added after the webapp endpoint to form the base path for the JAX-RS container)context
-- Returns:
-
getRestServicesEndpoint
Return the base path for this webapp- Parameters:
localEndpointDiscovery
-- Returns:
-