EchoPoint
1.0

echopoint.servlet
Class EchoPointServer

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended bynextapp.echoservlet.EchoServer
              extended byechopoint.servlet.EchoPointServer
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public abstract class EchoPointServer
extends nextapp.echoservlet.EchoServer

EchoPointServer is a derivation of EchoServer that provides some more services than the standard one.

* A full exception dump facility to help with diagnosis of application problems.

* Optional compression of textual browser interactions.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class nextapp.echoservlet.EchoServer
nextapp.echoservlet.EchoServer.MultipartRequestWrapper
 
Field Summary
 
Fields inherited from class nextapp.echoservlet.EchoServer
CHARACTER_ENCODING_ISO_8859_1, CHARACTER_ENCODING_ISO_8859_2, CHARACTER_ENCODING_ISO_8859_3, CHARACTER_ENCODING_ISO_8859_4, CHARACTER_ENCODING_ISO_8859_5, CHARACTER_ENCODING_US_ASCII, CHARACTER_ENCODING_UTF_8, ID_STRING, SERVICE_BLANK_DOCUMENT, SERVICE_CLIENT_ERROR_SCRIPT, SERVICE_COLLECTIONS_SCRIPT, SERVICE_INITIALIZER, SERVICE_SAFE_INVOKE_DEFAULT, SERVICE_SAFE_INVOKE_EXCEPTION_SUPPORT, SERVICE_SESSION_EXPIRED
 
Constructor Summary
EchoPointServer()
           
 
Method Summary
protected  void describeThrowable(nextapp.echoservlet.InstancePeer instancePeer, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Throwable throwable)
          This method is called to descibe an error condition.
 java.lang.String getApplicationTitle()
          Returns the name of this web application for display purposes
 boolean isCompressionUsed()
          Returns true if compression should be used to compress replies back client browsers that can accept compressed content.
protected  void process(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
protected  void processException(nextapp.echoservlet.InstancePeer instancePeer, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Exception ex)
          This method provides a more helpful and detailed explanation of the exception has occurred.
protected  void processThrowable(nextapp.echoservlet.InstancePeer instancePeer, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Throwable throwable)
          This method provides a more helpful and detailed explanation of the exception has occurred.
 void setCompressionUsed(boolean b)
          Controls whether compression will be used on replies to client browsers that can accept compressed content.
 
Methods inherited from class nextapp.echoservlet.EchoServer
addGlobalService, doGet, doPost, getApplicationProperties, getDefaultLocale, getMultipartRequestWrapper, getSessionExpirationUri, init, loadPeerBindings, newInstance, setMultipartRequestWrapper
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, 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
 

Constructor Detail

EchoPointServer

public EchoPointServer()
Method Detail

process

protected void process(javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response)
                throws java.io.IOException,
                       javax.servlet.ServletException
Throws:
java.io.IOException
javax.servlet.ServletException
See Also:
EchoServer.process(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

processException

protected void processException(nextapp.echoservlet.InstancePeer instancePeer,
                                javax.servlet.http.HttpServletRequest request,
                                javax.servlet.http.HttpServletResponse response,
                                java.lang.Exception ex)
                         throws java.io.IOException,
                                javax.servlet.ServletException
This method provides a more helpful and detailed explanation of the exception has occurred. This method ends up being a pass through call to processThrowable().

Throws:
java.io.IOException
javax.servlet.ServletException
See Also:
EchoServer.processException(nextapp.echoservlet.InstancePeer, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.Exception), processThrowable(InstancePeer, HttpServletRequest, HttpServletResponse, Throwable)

processThrowable

protected void processThrowable(nextapp.echoservlet.InstancePeer instancePeer,
                                javax.servlet.http.HttpServletRequest request,
                                javax.servlet.http.HttpServletResponse response,
                                java.lang.Throwable throwable)
                         throws java.io.IOException,
                                javax.servlet.ServletException
This method provides a more helpful and detailed explanation of the exception has occurred. If you want to customise what happens in this method, you should overrride the describeThrowable method not this one, as this one does important setup.

This method is needed so that Throwable objects can be caught as well as Exceptions.

Throws:
java.io.IOException
javax.servlet.ServletException
See Also:
EchoServer.processException(nextapp.echoservlet.InstancePeer, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.Exception)

describeThrowable

protected void describeThrowable(nextapp.echoservlet.InstancePeer instancePeer,
                                 javax.servlet.http.HttpServletRequest request,
                                 javax.servlet.http.HttpServletResponse response,
                                 java.lang.Throwable throwable)
                          throws java.io.IOException
This method is called to descibe an error condition. It is called indirectly from the processException() / processThrowable() method. You should override this method if you want to customise what is displayed to the user, not the processException() / processThrowable() method.

Parameters:
instancePeer - - the instancePeer in play
request - - the HttpServletRequest in play
response - - the HttpServletResponse in play
throwable - - the Throwable to describe
Throws:
java.io.IOException
See Also:
EchoServer.processException(InstancePeer, HttpServletRequest, HttpServletResponse, Exception), processException(InstancePeer, HttpServletRequest, HttpServletResponse, Exception)

getApplicationTitle

public java.lang.String getApplicationTitle()
Returns the name of this web application for display purposes

Returns:
the name of this web application for display purposes

isCompressionUsed

public boolean isCompressionUsed()
Returns true if compression should be used to compress replies back client browsers that can accept compressed content.

Returns:
true if compression should be used to compress replies back client browsers that can accept compressed content.
See Also:
CompressingHttpServletResponse, CompressingHttpServletResponse.getInstance(HttpServletRequest, HttpServletResponse)

setCompressionUsed

public void setCompressionUsed(boolean b)
Controls whether compression will be used on replies to client browsers that can accept compressed content.

Parameters:
b - - true or false
See Also:
CompressingHttpServletResponse, CompressingHttpServletResponse.getInstance(HttpServletRequest, HttpServletResponse)

EchoPoint
1.0