Class HessianServlet

  • All Implemented Interfaces:
    java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

    public class HessianServlet
    extends javax.servlet.http.HttpServlet
    Servlet for serving Hessian services.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      HessianServlet()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected Hessian2Input createHessian2Input​(java.io.InputStream is)  
      java.lang.Class<?> getAPIClass()
      Gets the api-class.
      protected java.lang.ClassLoader getContextClassLoader()  
      SerializerFactory getSerializerFactory()
      Gets the serializer factory.
      java.lang.String getServletInfo()  
      void init​(javax.servlet.ServletConfig config)
      Initialize the service, including the service object.
      protected void invoke​(java.io.InputStream is, java.io.OutputStream os, java.lang.String objectId, SerializerFactory serializerFactory)  
      void service​(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
      Execute a request.
      void setAPIClass​(java.lang.Class<?> api)
      Sets the api-class.
      void setDebug​(boolean isDebug)
      Sets the debugging flag.
      void setHome​(java.lang.Object home)
      Sets the home implementation
      void setHomeAPI​(java.lang.Class<?> api)
      Sets the home api.
      void setLogName​(java.lang.String name)
      Sets the debugging log name.
      void setObject​(java.lang.Object object)
      Sets the object implementation
      void setObjectAPI​(java.lang.Class<?> api)
      Sets the object api.
      void setSendCollectionType​(boolean sendType)
      Sets the serializer send collection java type.
      void setSerializerFactory​(SerializerFactory factory)
      Sets the serializer factory.
      void setService​(java.lang.Object service)
      Sets the service class.
      • Methods inherited from class javax.servlet.http.HttpServlet

        doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
      • Methods inherited from class javax.servlet.GenericServlet

        destroy, 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

      • getServletInfo

        public java.lang.String getServletInfo()
        Specified by:
        getServletInfo in interface javax.servlet.Servlet
        Overrides:
        getServletInfo in class javax.servlet.GenericServlet
      • setHomeAPI

        public void setHomeAPI​(java.lang.Class<?> api)
        Sets the home api.
      • setHome

        public void setHome​(java.lang.Object home)
        Sets the home implementation
      • setObjectAPI

        public void setObjectAPI​(java.lang.Class<?> api)
        Sets the object api.
      • setObject

        public void setObject​(java.lang.Object object)
        Sets the object implementation
      • setService

        public void setService​(java.lang.Object service)
        Sets the service class.
      • setAPIClass

        public void setAPIClass​(java.lang.Class<?> api)
        Sets the api-class.
      • getAPIClass

        public java.lang.Class<?> getAPIClass()
        Gets the api-class.
      • setSerializerFactory

        public void setSerializerFactory​(SerializerFactory factory)
        Sets the serializer factory.
      • getSerializerFactory

        public SerializerFactory getSerializerFactory()
        Gets the serializer factory.
      • setSendCollectionType

        public void setSendCollectionType​(boolean sendType)
        Sets the serializer send collection java type.
      • setDebug

        public void setDebug​(boolean isDebug)
        Sets the debugging flag.
      • setLogName

        public void setLogName​(java.lang.String name)
        Sets the debugging log name.
      • init

        public void init​(javax.servlet.ServletConfig config)
                  throws javax.servlet.ServletException
        Initialize the service, including the service object.
        Specified by:
        init in interface javax.servlet.Servlet
        Overrides:
        init in class javax.servlet.GenericServlet
        Throws:
        javax.servlet.ServletException
      • getContextClassLoader

        protected java.lang.ClassLoader getContextClassLoader()
      • service

        public void service​(javax.servlet.ServletRequest request,
                            javax.servlet.ServletResponse response)
                     throws java.io.IOException,
                            javax.servlet.ServletException
        Execute a request. The path-info of the request selects the bean. Once the bean's selected, it will be applied.
        Specified by:
        service in interface javax.servlet.Servlet
        Overrides:
        service in class javax.servlet.http.HttpServlet
        Throws:
        java.io.IOException
        javax.servlet.ServletException
      • invoke

        protected void invoke​(java.io.InputStream is,
                              java.io.OutputStream os,
                              java.lang.String objectId,
                              SerializerFactory serializerFactory)
                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • createHessian2Input

        protected Hessian2Input createHessian2Input​(java.io.InputStream is)