com.senseidb.servlet
Class AbstractSenseiClientServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.senseidb.servlet.ZookeeperConfigurableServlet
              extended by com.senseidb.servlet.AbstractSenseiClientServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
Direct Known Subclasses:
AbstractSenseiRestServlet

public abstract class AbstractSenseiClientServlet
extends ZookeeperConfigurableServlet

See Also:
Serialized Form

Field Summary
static int BQL_PARSING_ERROR
           
 
Fields inherited from class com.senseidb.servlet.ZookeeperConfigurableServlet
clusterClientName, clusterName, connectTimeoutMillis, loadBalancerFactory, maxConnectionsPerNode, staleRequestCleanupFrequencyMins, staleRequestTimeoutMins, versionComparator, writeTimeoutMillis, zkTimeout, zkurl
 
Constructor Summary
AbstractSenseiClientServlet()
           
 
Method Summary
protected abstract  SenseiRequest buildSenseiRequest(javax.servlet.http.HttpServletRequest req)
           
protected abstract  void convertResult(SenseiRequest req, SenseiResult res, OutputStream ostream)
           
protected abstract  void convertResult(SenseiSystemInfo info, OutputStream ostream)
           
 void destroy()
           
protected  void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
protected  void doOptions(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
protected  void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
static Map<String,String> getParameters(String query)
           
 void init(javax.servlet.ServletConfig config)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BQL_PARSING_ERROR

public static final int BQL_PARSING_ERROR
See Also:
Constant Field Values
Constructor Detail

AbstractSenseiClientServlet

public AbstractSenseiClientServlet()
Method Detail

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class ZookeeperConfigurableServlet
Throws:
javax.servlet.ServletException

buildSenseiRequest

protected abstract SenseiRequest buildSenseiRequest(javax.servlet.http.HttpServletRequest req)
                                             throws Exception
Throws:
Exception

getParameters

public static Map<String,String> getParameters(String query)
                                        throws Exception
Throws:
Exception

doGet

protected void doGet(javax.servlet.http.HttpServletRequest req,
                     javax.servlet.http.HttpServletResponse resp)
              throws javax.servlet.ServletException,
                     IOException
Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
IOException

doPost

protected void doPost(javax.servlet.http.HttpServletRequest req,
                      javax.servlet.http.HttpServletResponse resp)
               throws javax.servlet.ServletException,
                      IOException
Overrides:
doPost in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
IOException

doOptions

protected void doOptions(javax.servlet.http.HttpServletRequest req,
                         javax.servlet.http.HttpServletResponse resp)
                  throws javax.servlet.ServletException,
                         IOException
Overrides:
doOptions in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
IOException

convertResult

protected abstract void convertResult(SenseiSystemInfo info,
                                      OutputStream ostream)
                               throws Exception
Throws:
Exception

convertResult

protected abstract void convertResult(SenseiRequest req,
                                      SenseiResult res,
                                      OutputStream ostream)
                               throws Exception
Throws:
Exception

destroy

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


Copyright © 2010-2012. All Rights Reserved.