org.caleigo.toolkit.tunnel
Class HTTPTunnelServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byorg.caleigo.toolkit.tunnel.HTTPTunnelServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public abstract class HTTPTunnelServlet
extends javax.servlet.http.HttpServlet

Version:
1.00
Author:
Mattias Hagstrand
See Also:
Serialized Form

Field Summary
protected  HTTPTunnelServer mHTTPTunnelServer
           
 
Constructor Summary
HTTPTunnelServlet()
           
 
Method Summary
 void destroy()
          Destroys the servlet.
protected  void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handles the HTTP GET method.
protected  void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handles the HTTP POST method.
 java.lang.String getApplicationRootPath()
          Help method that returns the root path to where the application is started from.
protected abstract  java.lang.String getDescription()
           
protected abstract  IService[] getServices()
           
 java.lang.String getServletInfo()
          Returns a short description of the servlet.
 void init()
          Initializes the servlet.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
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
 

Field Detail

mHTTPTunnelServer

protected HTTPTunnelServer mHTTPTunnelServer
Constructor Detail

HTTPTunnelServlet

public HTTPTunnelServlet()
Method Detail

init

public void init()
          throws javax.servlet.ServletException
Initializes the servlet.

Throws:
javax.servlet.ServletException

destroy

public void destroy()
Destroys the servlet.


doGet

protected void doGet(javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response)
              throws javax.servlet.ServletException,
                     java.io.IOException
Handles the HTTP GET method.

Parameters:
request - servlet request
response - servlet response
Throws:
javax.servlet.ServletException
java.io.IOException

doPost

protected void doPost(javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response)
               throws javax.servlet.ServletException,
                      java.io.IOException
Handles the HTTP POST method.

Parameters:
request - servlet request
response - servlet response
Throws:
javax.servlet.ServletException
java.io.IOException

getServletInfo

public java.lang.String getServletInfo()
Returns a short description of the servlet.


getDescription

protected abstract java.lang.String getDescription()

getServices

protected abstract IService[] getServices()

getApplicationRootPath

public java.lang.String getApplicationRootPath()
Help method that returns the root path to where the application is started from. If the application was started as a jar application the system path to that jar is returned. If the the application was started as a class file structure the system path to the root/default package is returned.

Returns:
The root path with at trailing '/' or null if the path could not be calculated.


Copyright © 2005 Caleigo. All Rights Reserved.