org.apache.cayenne.remote.hessian.service
Class HessianServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by com.caucho.hessian.server.HessianServlet
          extended by org.apache.cayenne.remote.hessian.service.HessianServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class HessianServlet
extends com.caucho.hessian.server.HessianServlet

An extension of the com.caucho.hessian.server.HessianServlet that installs default Cayenne handlers, simplifying web.xml configuration. Here is a sample configuration:

        <servlet>
          <servlet-name>cayenne</servlet-name>
          <servlet-class>org.apache.cayenne.remote.hessian.service.HessianServlet</servlet-class>
        </servlet>
                        
        <servlet-mapping>
          <servlet-name>cayenne</servlet-name>
          <url-pattern>/cayenne</url-pattern>
        </servlet-mapping>
 
Custom service class and interface can be specified in a manner compatible with Hessian recommendations, namely via service-class and api-class servlet parameters.

Since:
1.2
See Also:
Serialized Form

Constructor Summary
HessianServlet()
           
 
Method Summary
protected  Class createAPIClass(javax.servlet.ServletConfig config)
           
protected  HessianService createService(javax.servlet.ServletConfig config)
           
 void destroy()
           
 void init(javax.servlet.ServletConfig config)
          Installs HessianService to respond to RemoteService requests.
 
Methods inherited from class com.caucho.hessian.server.HessianServlet
getAPIClass, getSerializerFactory, getServletInfo, service, setAPIClass, setDebug, setHome, setHomeAPI, setLogName, setObject, setObjectAPI, setSendCollectionType, setSerializerFactory, setService
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HessianServlet

public HessianServlet()
Method Detail

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Installs HessianService to respond to RemoteService requests.

Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class com.caucho.hessian.server.HessianServlet
Throws:
javax.servlet.ServletException

destroy

public void destroy()
Specified by:
destroy in interface javax.servlet.Servlet
Overrides:
destroy in class javax.servlet.GenericServlet

createService

protected HessianService createService(javax.servlet.ServletConfig config)
                                throws javax.servlet.ServletException
Throws:
javax.servlet.ServletException

createAPIClass

protected Class createAPIClass(javax.servlet.ServletConfig config)
                        throws javax.servlet.ServletException
Throws:
javax.servlet.ServletException


Copyright © 2001-2011 Apache Cayenne. All Rights Reserved.