public class RestRequestListener extends HttpServlet
Modifier and Type | Field and Description |
---|---|
private static String |
BUILD_TAG
Build String.
|
protected static String |
className_
Class constant.
|
static String |
CLIENT_SETTING_NAME_BROWSER_NAME |
static String |
CLIENT_SETTING_NAME_BROWSER_VERSION |
static String |
CLIENT_SETTING_NAME_DEVICE_TYPE |
static String |
CLIENT_SETTING_NAME_VIEWPORTHEIGHT |
static String |
CLIENT_SETTING_NAME_VIEWPORTWIDTH |
private boolean |
debugOut_ |
private static Eiscp |
eiscp_ |
private LedNetProxy |
led_
The Helper classes.
|
(package private) String |
ledenetIP_ |
(package private) int |
ledenetPort_ |
protected static Log |
log_ |
(package private) int |
rest_type_ |
static int |
REST_TYPE_EISCP |
static int |
REST_TYPE_LED |
(package private) String |
rgbw_ |
private static String |
SERVLET_VERSION
Version String.
|
private static String |
SYSTEM_FILE_SEPERATOR |
private static String |
webServerHostName_ |
Constructor and Description |
---|
RestRequestListener() |
Modifier and Type | Method and Description |
---|---|
private String |
checkForAjaxRequest(HttpServletRequest req) |
private String |
checkForRestRequest(HttpServletRequest req)
Parses the passed in request and performs any requested services.
|
private void |
connectToEiscp() |
void |
destroy()
Override to close up the persister *
|
void |
doGet(HttpServletRequest req,
HttpServletResponse res)
This method handles the "GET" submission - SHOULD NEVER be called by the Eagle it is used for Ajax calls to set
webApp parameters using JQuery
and to send commands back to the eagle on next message posted.
|
void |
doPost(HttpServletRequest req,
HttpServletResponse res)
This method handles the "POST" submission - the default way the a listener works.
|
boolean |
getDebugOut()
Returns the value of debugOut_.
|
String |
getServletInfo()
Gets the ServletInfo attribute of the JavaMailServlet object
|
void |
init()
The one time servlet init stuff goes here.
|
private void |
parseParams(HttpServletRequest req) |
private void |
sendAdminPage(HttpServletRequest req,
HttpServletResponse res) |
void |
setDebugOut(boolean debugOut)
Sets the value of debugOut_.
|
private void |
streamZIP(OutputStream servletOut,
String[] dataNames,
InputStream[] dataStreams)
streams to a zipped out stream (without creating a file).
|
private void |
streamZIP(OutputStream servletOut,
String dataName,
InputStream dataStream) |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log
protected static final String className_
private static final String SYSTEM_FILE_SEPERATOR
private static final String SERVLET_VERSION
public static final String CLIENT_SETTING_NAME_VIEWPORTWIDTH
public static final String CLIENT_SETTING_NAME_VIEWPORTHEIGHT
public static final String CLIENT_SETTING_NAME_BROWSER_NAME
public static final String CLIENT_SETTING_NAME_BROWSER_VERSION
public static final String CLIENT_SETTING_NAME_DEVICE_TYPE
public static final int REST_TYPE_LED
public static final int REST_TYPE_EISCP
private static final String BUILD_TAG
private static String webServerHostName_
private LedNetProxy led_
String ledenetIP_
int ledenetPort_
int rest_type_
private boolean debugOut_
public RestRequestListener()
public String getServletInfo()
getServletInfo
in interface Servlet
getServletInfo
in class GenericServlet
public void init()
init
in class GenericServlet
public void destroy()
destroy
in interface Servlet
destroy
in class GenericServlet
public boolean getDebugOut()
public void setDebugOut(boolean debugOut)
debugOut
- The value to assign debugOut_.private void streamZIP(OutputStream servletOut, String dataName, InputStream dataStream)
private void streamZIP(OutputStream servletOut, String[] dataNames, InputStream[] dataStreams)
servletOutput
- is the stream to zip intodataNames
- are the pseudo fileNames that will get created in the zip (pseudo file) streamdataStreams
- the data to zipprivate void parseParams(HttpServletRequest req)
public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
doGet
in class HttpServlet
req
- Description of the Parameterres
- Description of the ParameterServletException
- Description of the ExceptionIOException
- Description of the Exceptionpublic void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
doPost
in class HttpServlet
req
- Description of Parameterres
- Description of ParameterServletException
- Description of ExceptionIOException
- Description of Exceptionprivate String checkForRestRequest(HttpServletRequest req) throws ServletException, IOException
ServletException
IOException
private void connectToEiscp()
private String checkForAjaxRequest(HttpServletRequest req) throws ServletException, IOException
ServletException
IOException
private void sendAdminPage(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
ServletException
IOException
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses