org.apache.turbine.services.servlet
Interface ServletService

All Superinterfaces:
Initable, Service
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: ServletService.java 534527 2007-05-02 16:10:59Z tv $
Author:
Jeff Brekke, Raphaël Luta, Jason van Zyl

Field Summary
static java.lang.String SERVICE_NAME
          The service identifier
 
Method Summary
 java.lang.String getContextPath()
          Returns the context path for this Turbine application.
 java.lang.String getRealPath(java.lang.String uri)
          Returns the complete filesystem path for a given URI
 java.net.URL getResource(java.lang.String uri)
          Returns an URL object for a given URI string.
 java.io.InputStream getResourceAsStream(java.lang.String uri)
          Same as getResource except that it returns an InputStream
 java.lang.String getServerName()
          Returns the server name that this Turbine application is running on.
 java.lang.String getServerPort()
          Returns the port that this Turbine application is running through on the server.
 java.lang.String getServerScheme()
          Returns the server scheme for this Turbine application.
 javax.servlet.ServletConfig getServletConfig()
          Returns the servlet config used by this Turbine web application.
 javax.servlet.ServletContext getServletContext()
          Returns the servlet context used by this Turbine web application.
 
Methods inherited from interface org.apache.turbine.services.Service
getConfiguration, getName, getProperties, setName, setServiceBroker
 
Methods inherited from interface org.apache.turbine.services.Initable
getInit, init, init, setInitableBroker, shutdown
 

Field Detail

SERVICE_NAME

public static final java.lang.String SERVICE_NAME
The service identifier

See Also:
Constant Field Values
Method Detail

getResource

public java.net.URL getResource(java.lang.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

public java.io.InputStream getResourceAsStream(java.lang.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

public java.lang.String getRealPath(java.lang.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

public javax.servlet.ServletConfig getServletConfig()
Returns the servlet config used by this Turbine web application.

Returns:
turbine servlet config

getServletContext

public javax.servlet.ServletContext getServletContext()
Returns the servlet context used by this Turbine web application.

Returns:
turbine servlet context

getServerScheme

public java.lang.String getServerScheme()
Returns the server scheme for this Turbine application. This will either be http or https.

Returns:
String

getServerName

public java.lang.String getServerName()
Returns the server name that this Turbine application is running on.

Returns:
String

getServerPort

public java.lang.String getServerPort()
Returns the port that this Turbine application is running through on the server.

Returns:
String

getContextPath

public java.lang.String getContextPath()
Returns the context path for this Turbine application.

Returns:
String


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.