jmri.web.miniserver
Class MiniServletRequest

java.lang.Object
  extended by jmri.web.miniserver.MiniServletRequest
All Implemented Interfaces:
javax.servlet.ServletRequest

public class MiniServletRequest
extends Object
implements javax.servlet.ServletRequest

Encapsulate a request.

Although not the same as javax.servlet.HttpServletRequest, this is meant to be method-signature compatible, so that we can move to servlets later on.

Author:
Bob Jacobsen Copyright 2008

Constructor Summary
MiniServletRequest(BufferedReader in)
           
 
Method Summary
 Object getAttribute(String s)
           
 Enumeration<String> getAttributeNames()
           
 String getCharacterEncoding()
           
 int getContentLength()
           
 String getContentType()
           
 javax.servlet.ServletInputStream getInputStream()
           
 Locale getLocale()
           
 Enumeration<String> getLocales()
           
 String getParameter(String s)
           
 Enumeration<String> getParameterNames()
           
 String[] getParameterValues(String s)
           
 String getProtocol()
           
 BufferedReader getReader()
           
 String getRealPath(String s)
          Deprecated. 
 String getRemoteAddr()
           
 String getRemoteHost()
           
 javax.servlet.RequestDispatcher getRequestDispatcher(String s)
           
 String getScheme()
           
 String getServerName()
           
 int getServerPort()
           
 boolean isSecure()
           
 void removeAttribute(String s)
           
 void setAttribute(String s, Object o)
           
 void setContentLength(int i)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MiniServletRequest

public MiniServletRequest(BufferedReader in)
Method Detail

getReader

public BufferedReader getReader()
Specified by:
getReader in interface javax.servlet.ServletRequest

setAttribute

public void setAttribute(String s,
                         Object o)
Specified by:
setAttribute in interface javax.servlet.ServletRequest

removeAttribute

public void removeAttribute(String s)
Specified by:
removeAttribute in interface javax.servlet.ServletRequest

isSecure

public boolean isSecure()
Specified by:
isSecure in interface javax.servlet.ServletRequest

getServerPort

public int getServerPort()
Specified by:
getServerPort in interface javax.servlet.ServletRequest

getInputStream

public javax.servlet.ServletInputStream getInputStream()
Specified by:
getInputStream in interface javax.servlet.ServletRequest

getServerName

public String getServerName()
Specified by:
getServerName in interface javax.servlet.ServletRequest

getScheme

public String getScheme()
Specified by:
getScheme in interface javax.servlet.ServletRequest

getProtocol

public String getProtocol()
Specified by:
getProtocol in interface javax.servlet.ServletRequest

getContentType

public String getContentType()
Specified by:
getContentType in interface javax.servlet.ServletRequest

getContentLength

public int getContentLength()
Specified by:
getContentLength in interface javax.servlet.ServletRequest

getAttributeNames

public Enumeration<String> getAttributeNames()
Specified by:
getAttributeNames in interface javax.servlet.ServletRequest

getAttribute

public Object getAttribute(String s)
Specified by:
getAttribute in interface javax.servlet.ServletRequest

getCharacterEncoding

public String getCharacterEncoding()
Specified by:
getCharacterEncoding in interface javax.servlet.ServletRequest

getParameterValues

public String[] getParameterValues(String s)
Specified by:
getParameterValues in interface javax.servlet.ServletRequest

getParameterNames

public Enumeration<String> getParameterNames()
Specified by:
getParameterNames in interface javax.servlet.ServletRequest

getParameter

public String getParameter(String s)
Specified by:
getParameter in interface javax.servlet.ServletRequest

getRequestDispatcher

public javax.servlet.RequestDispatcher getRequestDispatcher(String s)
Specified by:
getRequestDispatcher in interface javax.servlet.ServletRequest

getLocales

public Enumeration<String> getLocales()
Specified by:
getLocales in interface javax.servlet.ServletRequest

getLocale

public Locale getLocale()
Specified by:
getLocale in interface javax.servlet.ServletRequest

getRemoteHost

public String getRemoteHost()
Specified by:
getRemoteHost in interface javax.servlet.ServletRequest

getRemoteAddr

public String getRemoteAddr()
Specified by:
getRemoteAddr in interface javax.servlet.ServletRequest

getRealPath

@Deprecated
public String getRealPath(String s)
Deprecated. 

Specified by:
getRealPath in interface javax.servlet.ServletRequest

setContentLength

public void setContentLength(int i)


Copyright © 1997 - 2011 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