Interface ServletService
-
- All Known Implementing Classes:
TurbineServletService
public interface ServletService extends Service
This interface exposes methods of the runner context in order resolve or get access to external resources
- Version:
- $Id$
- Author:
- Jeff Brekke, Raphaƫl Luta, Jason van Zyl
-
-
Field Summary
Fields Modifier and Type Field Description static String
SERVICE_NAME
The service identifier
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getContextPath()
Returns the context path for this Turbine application.String
getRealPath(String uri)
Returns the complete filesystem path for a given URIURL
getResource(String uri)
Returns an URL object for a given URI string.InputStream
getResourceAsStream(String uri)
Same as getResource except that it returns an InputStreamString
getServerName()
Returns the server name that this Turbine application is running on.String
getServerPort()
Returns the port that this Turbine application is running through on the server.String
getServerScheme()
Returns the server scheme for this Turbine application.ServletConfig
getServletConfig()
Returns the servlet config used by this Turbine web application.ServletContext
getServletContext()
Returns the servlet context used by this Turbine web application.-
Methods inherited from interface org.apache.turbine.services.Initable
getInit, init, init, setInitableBroker, shutdown
-
Methods inherited from interface org.apache.turbine.services.Service
getConfiguration, getName, getProperties, setName, setServiceBroker
-
-
-
-
Field Detail
-
SERVICE_NAME
static final String SERVICE_NAME
The service identifier- See Also:
- Constant Field Values
-
-
Method Detail
-
getResource
URL getResource(String uri)
Returns an URL object for a given URI string.- Parameters:
uri
- the URI to resolve as an URL- Returns:
- an URL object or null is the uri is malformed or can't be resolved
-
getResourceAsStream
InputStream getResourceAsStream(String uri)
Same as getResource except that it returns an InputStream- Parameters:
uri
- the URI to resolve- Returns:
- an InputStream on the URI content or null
-
getRealPath
String getRealPath(String uri)
Returns the complete filesystem path for a given URI- Parameters:
uri
- the URI to resolve- Returns:
- the full system path of this URI
-
getServletConfig
ServletConfig getServletConfig()
Returns the servlet config used by this Turbine web application.- Returns:
- turbine servlet config
-
getServletContext
ServletContext getServletContext()
Returns the servlet context used by this Turbine web application.- Returns:
- turbine servlet context
-
getServerScheme
String getServerScheme()
Returns the server scheme for this Turbine application. This will either be http or https.- Returns:
- String
-
getServerName
String getServerName()
Returns the server name that this Turbine application is running on.- Returns:
- String
-
getServerPort
String getServerPort()
Returns the port that this Turbine application is running through on the server.- Returns:
- String
-
getContextPath
String getContextPath()
Returns the context path for this Turbine application.- Returns:
- String
-
-