com.noelios.restlet.ext.servlet
Class ServletContextAdapter

java.lang.Object
  extended by org.restlet.Context
      extended by com.noelios.restlet.ext.servlet.ServletContextAdapter

public class ServletContextAdapter
extends Context

Exposes a Servlet context as a Restlet one. Context allowing access to the component's connectors, reusing the Servlet's logging mechanism and adding the Servlet's initialization parameters to the context's parameters.

Author:
Jerome Louvel

Constructor Summary
ServletContextAdapter(Servlet servlet)
          Deprecated. Use this constructor ServletContextAdapter(Servlet, Context) instead.
ServletContextAdapter(Servlet servlet, Context parentContext)
          Constructor.
 
Method Summary
 Uniform getClientDispatcher()
           
 Uniform getServerDispatcher()
           
 ServletContext getServletContext()
          Returns the Servlet context.
 
Methods inherited from class org.restlet.Context
createChildContext, getAttributes, getCurrent, getCurrentLogger, getDispatcher, getLogger, getParameters, setAttributes, setCurrent, setLogger, setLogger, setParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletContextAdapter

@Deprecated
public ServletContextAdapter(Servlet servlet)
Deprecated. Use this constructor ServletContextAdapter(Servlet, Context) instead.

Constructor.

Parameters:
servlet - The parent Servlet.

ServletContextAdapter

public ServletContextAdapter(Servlet servlet,
                             Context parentContext)
Constructor.

Parameters:
servlet - The parent Servlet.
parentContext - The parent context.
Method Detail

getClientDispatcher

public Uniform getClientDispatcher()
Overrides:
getClientDispatcher in class Context

getServerDispatcher

public Uniform getServerDispatcher()
Overrides:
getServerDispatcher in class Context

getServletContext

public ServletContext getServletContext()
Returns the Servlet context.

Returns:
The Servlet context.


Copyright © 2005-2008 Noelios Technologies.