net.sf.crispy.server
Class HttpServiceEndpoint

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended bynet.sf.crispy.server.HttpServiceEndpoint
All Implemented Interfaces:
java.io.Serializable, ServiceEndpoint, javax.servlet.Servlet, javax.servlet.ServletConfig
Direct Known Subclasses:
HttpServlet, XmlRpcHttpServlet

public class HttpServiceEndpoint
extends javax.servlet.http.HttpServlet
implements ServiceEndpoint

A special implementation from a ServiceEndpoint for the http protocoll.

Since:
1.1.0
Author:
Linke
See Also:
Serialized Form

Constructor Summary
HttpServiceEndpoint()
           
 
Method Summary
 InterceptorHandler createNewInterceptorHandlerInstance()
          Hint:Every call from this method must get a new instance from InterceptorHandler!
 java.lang.Object doInvoke(java.lang.Object pvServiceImpl, java.lang.reflect.Method pvMethod, java.lang.Object[] pvArgs, InterceptorHandler pvInterceptorHandler)
          Execute the service with the InvocationHandler with delegate to doInvoke.
 InterceptorHandlerCreator getInterceptorHandlerCreator()
          Get a implementation for the interface InterceptorHandlerCreator.
 java.lang.Object getService(javax.servlet.http.HttpServletRequest pvRequest, javax.servlet.http.HttpServletResponse pvResponse)
          This is a alternative to the Object getService(String pvServiceInterfaceName) method.
 void setInterceptorHandlerCreator(InterceptorHandlerCreator pvCreator)
          Set a implementation for the interface InterceptorHandlerCreator.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpServiceEndpoint

public HttpServiceEndpoint()
Method Detail

setInterceptorHandlerCreator

public void setInterceptorHandlerCreator(InterceptorHandlerCreator pvCreator)
Description copied from interface: ServiceEndpoint
Set a implementation for the interface InterceptorHandlerCreator. It is equally with the method createNewInterceptorHandlerInstance.

Specified by:
setInterceptorHandlerCreator in interface ServiceEndpoint
Parameters:
pvCreator -

getInterceptorHandlerCreator

public InterceptorHandlerCreator getInterceptorHandlerCreator()
Description copied from interface: ServiceEndpoint
Get a implementation for the interface InterceptorHandlerCreator.

Specified by:
getInterceptorHandlerCreator in interface ServiceEndpoint
Returns:
The InterceptorHandlerCreator implementation.

createNewInterceptorHandlerInstance

public final InterceptorHandler createNewInterceptorHandlerInstance()
Description copied from interface: ServiceEndpoint
Hint:Every call from this method must get a new instance from InterceptorHandler!

Specified by:
createNewInterceptorHandlerInstance in interface ServiceEndpoint
Returns:
The desired implementation with registered interceptors.

getService

public java.lang.Object getService(javax.servlet.http.HttpServletRequest pvRequest,
                                   javax.servlet.http.HttpServletResponse pvResponse)
                            throws java.lang.Exception
This is a alternative to the Object getService(String pvServiceInterfaceName) method. With this method you can use SessionID (request.getSession().getId()) for a service with scope equals Session.

Parameters:
pvRequest -
pvResponse -
Returns:
The service implementation. Default retun value is null. For a real service implementation must override this method.
Throws:
java.lang.Exception

doInvoke

public java.lang.Object doInvoke(java.lang.Object pvServiceImpl,
                                 java.lang.reflect.Method pvMethod,
                                 java.lang.Object[] pvArgs,
                                 InterceptorHandler pvInterceptorHandler)
Description copied from interface: ServiceEndpoint
Execute the service with the InvocationHandler with delegate to doInvoke. If parameter InterceptorHandler is null, then is calling the method createNewInterceptorHandlerInstance, else is using the parameter InterceptorHandler.

Specified by:
doInvoke in interface ServiceEndpoint
Parameters:
pvServiceImpl -
pvMethod -
pvArgs -
pvInterceptorHandler -
Returns:
The result from the method execution.


Copyright © 2005-2006 Crispy. All Rights Reserved.