org.xmlBlaster.protocol.http.simple
Class PullServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.xmlBlaster.protocol.http.simple.PullServlet
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
public class PullServlet
- extends javax.servlet.http.HttpServlet
This servlet supports requests from a browser, it queries the topic given by
"gpsTopicId" configuration which needs to contain GPS coordinates (published
for example by a PDA).
Use xmlBlaster/demo/http/gpsmap.html to display the coordinates in a map.
- Author:
- Marcel Ruff xmlBlaster@marcelruff.info 2006
- See Also:
- Serialized Form
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
props
private java.util.Properties props
xmlBlasterAccess
private I_XmlBlasterAccess xmlBlasterAccess
loginName
private java.lang.String loginName
passwd
private java.lang.String passwd
PullServlet
public PullServlet()
init
public void init(javax.servlet.ServletConfig conf)
throws javax.servlet.ServletException
- Specified by:
init
in interface javax.servlet.Servlet
- Overrides:
init
in class javax.servlet.GenericServlet
- Throws:
javax.servlet.ServletException
doPost
public void doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws javax.servlet.ServletException,
java.io.IOException
- Overrides:
doPost
in class javax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
java.io.IOException
doGet
public void doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws javax.servlet.ServletException,
java.io.IOException
- Overrides:
doGet
in class javax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
java.io.IOException
isAction
private boolean isAction(java.lang.String ME,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws javax.servlet.ServletException,
java.io.IOException,
XmlBlasterException
- Throws:
javax.servlet.ServletException
java.io.IOException
XmlBlasterException
getFeedback
private java.lang.String getFeedback(javax.servlet.http.HttpServletRequest req)
throws XmlBlasterException,
java.io.UnsupportedEncodingException
- Throws:
XmlBlasterException
java.io.UnsupportedEncodingException
getCurrentPosition
private PullServlet.Position getCurrentPosition(javax.servlet.http.HttpServletRequest req)
throws XmlBlasterException
- Throws:
XmlBlasterException
feedbackHasChanged
private boolean feedbackHasChanged(javax.servlet.http.HttpServletRequest req,
java.lang.String sms)
positionHasChanged
private boolean positionHasChanged(javax.servlet.http.HttpServletRequest req,
PullServlet.Position pos)
getXmlBlaster
private I_XmlBlasterAccess getXmlBlaster(javax.servlet.http.HttpServletRequest req)
throws XmlBlasterException
- Throws:
XmlBlasterException
getUrl
public java.lang.String getUrl(PullServlet.Position pos)
getStartupUrl
public java.lang.String getStartupUrl()
parsePosition
public PullServlet.Position parsePosition(byte[] data_)
getServletInfo
public java.lang.String getServletInfo()
- Specified by:
getServletInfo
in interface javax.servlet.Servlet
- Overrides:
getServletInfo
in class javax.servlet.GenericServlet
destroy
public void destroy()
- Specified by:
destroy
in interface javax.servlet.Servlet
- Overrides:
destroy
in class javax.servlet.GenericServlet
log
public void log(java.lang.String text)
- Overrides:
log
in class javax.servlet.GenericServlet
Copyright © 1999-2014 The xmlBlaster.org contributers.