org.opencrx.application.airsync.server
Class SyncServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.opencrx.application.airsync.server.SyncServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class SyncServlet
extends HttpServlet

See Also:
Serialized Form

Field Summary
protected  SyncBackend backend
           
static String DEFAULT_PROFILE_PREFIX
           
static String DEFAULT_PROVIDER_NAME
           
static String DEFAULT_SEGMENT_NAME
           
static String DOMAIN_SEPARATOR
           
protected  Map<String,ServerHandler> handlers
           
 
Constructor Summary
SyncServlet()
           
 
Method Summary
protected  void doGet(HttpServletRequest request, HttpServletResponse response)
           
protected  void doOptions(HttpServletRequest request, HttpServletResponse response)
           
protected  void doPost(HttpServletRequest request, HttpServletResponse response)
           
protected  ServerHandler getHandler(String command)
           
protected  SyncRequest getSyncRequest(HttpServletRequest req)
           
protected  SyncResponse getSyncResponse(HttpServletResponse res)
           
protected  String getUserId(HttpServletRequest request)
           
 void init()
           
protected  void logRequest(HttpServletRequest request, String command)
           
protected  void setActiveSyncHeader(HttpServletResponse response)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, 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

DEFAULT_PROVIDER_NAME

public static final String DEFAULT_PROVIDER_NAME
See Also:
Constant Field Values

DEFAULT_SEGMENT_NAME

public static final String DEFAULT_SEGMENT_NAME
See Also:
Constant Field Values

DOMAIN_SEPARATOR

public static final String DOMAIN_SEPARATOR
See Also:
Constant Field Values

DEFAULT_PROFILE_PREFIX

public static final String DEFAULT_PROFILE_PREFIX
See Also:
Constant Field Values

handlers

protected Map<String,ServerHandler> handlers

backend

protected SyncBackend backend
Constructor Detail

SyncServlet

public SyncServlet()
Method Detail

init

public void init()
          throws ServletException
Overrides:
init in class GenericServlet
Throws:
ServletException

getSyncRequest

protected SyncRequest getSyncRequest(HttpServletRequest req)

getSyncResponse

protected SyncResponse getSyncResponse(HttpServletResponse res)

logRequest

protected void logRequest(HttpServletRequest request,
                          String command)

setActiveSyncHeader

protected void setActiveSyncHeader(HttpServletResponse response)

getHandler

protected ServerHandler getHandler(String command)

getUserId

protected String getUserId(HttpServletRequest request)

doOptions

protected void doOptions(HttpServletRequest request,
                         HttpServletResponse response)
                  throws ServletException,
                         IOException
Overrides:
doOptions in class HttpServlet
Throws:
ServletException
IOException

doPost

protected void doPost(HttpServletRequest request,
                      HttpServletResponse response)
               throws ServletException,
                      IOException
Overrides:
doPost in class HttpServlet
Throws:
ServletException
IOException

doGet

protected void doGet(HttpServletRequest request,
                     HttpServletResponse response)
              throws ServletException,
                     IOException
Overrides:
doGet in class HttpServlet
Throws:
ServletException
IOException


This software is published under the BSD license. Copyright © 2003-2013, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.