com.caucho.remote.server
Class AbstractProtocolServletFactory

java.lang.Object
  extended by com.caucho.remote.server.AbstractProtocolServletFactory
All Implemented Interfaces:
ProtocolServletFactory
Direct Known Subclasses:
BurlapProtocolServletFactory, HessianProtocolServletFactory

public abstract class AbstractProtocolServletFactory
extends java.lang.Object
implements ProtocolServletFactory

Abstract factory for creating @WebService and @Remote servlets.


Constructor Summary
AbstractProtocolServletFactory()
           
 
Method Summary
abstract  Servlet createServlet(java.lang.Class<?> serviceApi, java.lang.Object service)
          Creates a new servlet skeleton based on an API and an object
protected  java.lang.Class<?> getRemoteAPI(java.lang.Class<?> serviceClass)
          Returns the remote interface to expose as a service.
 void setAnnotated(Annotated annotated)
          Sets the ServiceType annotated
 void setServiceType(java.lang.annotation.Annotation ann)
          Sets the ServiceType annotation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractProtocolServletFactory

public AbstractProtocolServletFactory()
Method Detail

setServiceType

public void setServiceType(java.lang.annotation.Annotation ann)
Sets the ServiceType annotation

Specified by:
setServiceType in interface ProtocolServletFactory

setAnnotated

public void setAnnotated(Annotated annotated)
Sets the ServiceType annotated

Specified by:
setAnnotated in interface ProtocolServletFactory

createServlet

public abstract Servlet createServlet(java.lang.Class<?> serviceApi,
                                      java.lang.Object service)
                               throws ServiceException
Creates a new servlet skeleton based on an API and an object

Specified by:
createServlet in interface ProtocolServletFactory
Parameters:
serviceApi - the remoteApi exposed to the server
service - the managed service object
Throws:
ServiceException

getRemoteAPI

protected java.lang.Class<?> getRemoteAPI(java.lang.Class<?> serviceClass)
Returns the remote interface to expose as a service.