## helma.servlet
Class AbstractServletClient

    java.lang.Object
      javax.servlet.GenericServlet
          javax.servlet.http.HttpServlet
              helma.servlet.AbstractServletClient

All Implemented Interfaces:
  java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

Direct Known Subclasses:
  EmbeddedServletClient, StandaloneServletClient

    public abstract class AbstractServletClient

extends javax.servlet.http.HttpServlet

This is an abstract Hop servlet adapter. This class communicates with hop applications via RMI. Subclasses are either one servlet per app, or one servlet that handles multiple apps

See Also:
  Serialized Form

Constructor Summary
`AbstractServletClient()`

Method Summary
`java.lang.String` `getServletInfo()` Return servlet info
`void` `init(javax.servlet.ServletConfig init)` Init this servlet.
`protected void` `parseParameters(javax.servlet.http.HttpServletRequest request, RequestTrans reqtrans, java.lang.String encoding)`
`static void` `parseParameters(java.util.Map map, byte[] data, java.lang.String encoding, boolean isPost)` Append request parameters from the specified String to the specified Map.
`protected java.util.List` `parseUploads(org.apache.commons.fileupload.servlet.ServletRequestContext reqcx, RequestTrans reqtrans, UploadStatus uploadStatus, java.lang.String encoding)`
`protected void` `service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` Handle a request.
`protected void` `writeResponse(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, RequestTrans hopreq, ResponseTrans hopres)`

Methods inherited from class javax.servlet.http.HttpServlet
`doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service`

Methods inherited from class javax.servlet.GenericServlet
`destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AbstractServletClient

    public AbstractServletClient()

Method Detail

### init

    public void init(javax.servlet.ServletConfig init)
              throws javax.servlet.ServletException

  Init this servlet.

  Specified by:
    `init` in interface `javax.servlet.Servlet`
  Overrides:
    `init` in class `javax.servlet.GenericServlet`
  Parameters:
    `init` - the servlet configuration
  Throws:
    `javax.servlet.ServletException` - ...

### service

    protected void service(javax.servlet.http.HttpServletRequest request,
                           javax.servlet.http.HttpServletResponse response)
                    throws javax.servlet.ServletException,
                           java.io.IOException

  Handle a request.

  Overrides:
    `service` in class `javax.servlet.http.HttpServlet`
  Parameters:
    `request` - ...
    `response` - ...
  Throws:
    `javax.servlet.ServletException` - ...
    `java.io.IOException` - ...

### writeResponse

    protected void writeResponse(javax.servlet.http.HttpServletRequest req,
                                 javax.servlet.http.HttpServletResponse res,
                                 RequestTrans hopreq,
                                 ResponseTrans hopres)
                          throws java.io.IOException

  Throws:
    `java.io.IOException`

### parseUploads

    protected java.util.List parseUploads(org.apache.commons.fileupload.servlet.ServletRequestContext reqcx,
                                          RequestTrans reqtrans,
                                          UploadStatus uploadStatus,
                                          java.lang.String encoding)
                                   throws org.apache.commons.fileupload.FileUploadException,
                                          java.io.UnsupportedEncodingException

  Throws:
    `org.apache.commons.fileupload.FileUploadException`
    `java.io.UnsupportedEncodingException`

### parseParameters

    protected void parseParameters(javax.servlet.http.HttpServletRequest request,
                                   RequestTrans reqtrans,
                                   java.lang.String encoding)
                            throws java.io.IOException

  Throws:
    `java.io.IOException`

### parseParameters

    public static void parseParameters(java.util.Map map,
                                       byte[] data,
                                       java.lang.String encoding,
                                       boolean isPost)
                                throws java.io.UnsupportedEncodingException

  Append request parameters from the specified String to the specified Map. It is presumed that the specified Map is not accessed from any other thread, so no synchronization is performed.

  IMPLEMENTATION NOTE: URL decoding is performed individually on the parsed name and value elements, rather than on the entire query string ahead of time, to properly deal with the case where the name or value includes an encoded "=" or "&" character that would otherwise be interpreted as a delimiter. NOTE: byte array data is modified by this method. Caller beware.

  Parameters:
    `map` - Map that accumulates the resulting parameters
    `data` - Input string containing request parameters
    `encoding` - Encoding to use for converting hex
  Throws:
    `java.io.UnsupportedEncodingException` - if the data is malformed

### getServletInfo

    public java.lang.String getServletInfo()

  Return servlet info

  Specified by:
    `getServletInfo` in interface `javax.servlet.Servlet`
  Overrides:
    `getServletInfo` in class `javax.servlet.GenericServlet`
  Returns:
    the servlet info

Copyright © 1998-1998-${year} Helma.org. All Rights Reserved.