Package com.caucho.hessian.server
Class HessianServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- com.caucho.hessian.server.HessianServlet
-
- All Implemented Interfaces:
java.io.Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig
public class HessianServlet extends javax.servlet.http.HttpServletServlet 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 Hessian2InputcreateHessian2Input(java.io.InputStream is)java.lang.Class<?>getAPIClass()Gets the api-class.protected java.lang.ClassLoadergetContextClassLoader()SerializerFactorygetSerializerFactory()Gets the serializer factory.java.lang.StringgetServletInfo()voidinit(javax.servlet.ServletConfig config)Initialize the service, including the service object.protected voidinvoke(java.io.InputStream is, java.io.OutputStream os, java.lang.String objectId, SerializerFactory serializerFactory)voidservice(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)Execute a request.voidsetAPIClass(java.lang.Class<?> api)Sets the api-class.voidsetDebug(boolean isDebug)Sets the debugging flag.voidsetHome(java.lang.Object home)Sets the home implementationvoidsetHomeAPI(java.lang.Class<?> api)Sets the home api.voidsetLogName(java.lang.String name)Sets the debugging log name.voidsetObject(java.lang.Object object)Sets the object implementationvoidsetObjectAPI(java.lang.Class<?> api)Sets the object api.voidsetSendCollectionType(boolean sendType)Sets the serializer send collection java type.voidsetSerializerFactory(SerializerFactory factory)Sets the serializer factory.voidsetService(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
-
-
-
-
Method Detail
-
getServletInfo
public java.lang.String getServletInfo()
- Specified by:
getServletInfoin interfacejavax.servlet.Servlet- Overrides:
getServletInfoin classjavax.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.ServletExceptionInitialize the service, including the service object.- Specified by:
initin interfacejavax.servlet.Servlet- Overrides:
initin classjavax.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.ServletExceptionExecute a request. The path-info of the request selects the bean. Once the bean's selected, it will be applied.- Specified by:
servicein interfacejavax.servlet.Servlet- Overrides:
servicein classjavax.servlet.http.HttpServlet- Throws:
java.io.IOExceptionjavax.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)
-
-