jmri.web.miniserver
Class AbstractServlet

java.lang.Object
  extended by jmri.web.miniserver.AbstractServlet
All Implemented Interfaces:
javax.servlet.Servlet
Direct Known Subclasses:
EchoServlet, FileServlet

public abstract class AbstractServlet
extends Object
implements javax.servlet.Servlet

Implement some useful tools for a Servlet.

Author:
Bob Jacobsen Copyright 2008

Field Summary
protected  int maxRequestLines
           
 
Constructor Summary
AbstractServlet()
           
 
Method Summary
 void destroy()
           
protected  String[] getInputLines(BufferedReader in)
          As a service, parse the entire request into individual lines.
protected  String getRequest()
          As a service, get the requested URL.
 javax.servlet.ServletConfig getServletConfig()
           
 String getServletInfo()
           
 void init(javax.servlet.ServletConfig config)
           
abstract  void service(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

maxRequestLines

protected int maxRequestLines
Constructor Detail

AbstractServlet

public AbstractServlet()
Method Detail

service

public abstract void service(javax.servlet.ServletRequest req,
                             javax.servlet.ServletResponse res)
                      throws IOException
Specified by:
service in interface javax.servlet.Servlet
Throws:
IOException

getRequest

protected String getRequest()
As a service, get the requested URL.

Requires getInputLines has been called.


getInputLines

protected String[] getInputLines(BufferedReader in)
                          throws IOException
As a service, parse the entire request into individual lines.

Throws:
IOException

destroy

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

init

public void init(javax.servlet.ServletConfig config)
Specified by:
init in interface javax.servlet.Servlet

getServletInfo

public String getServletInfo()
Specified by:
getServletInfo in interface javax.servlet.Servlet

getServletConfig

public javax.servlet.ServletConfig getServletConfig()
Specified by:
getServletConfig in interface javax.servlet.Servlet


Copyright © 1997 - 2009 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads