JOtunnel by OOIT.com

com.ooit.jotunnel
Class JOServer

com.ooit.jotunnel.JOServer

public class JOServer

The JOTunnel server servlet.

This class serves as a pre processor of the serialize/deserialize process of a JOResponse/JORequest object.

A specific server has only to implement the JOResponse doJO(JORequest) method. The http communication works with compession or without.


Field Summary
 boolean debug
           
 
Constructor Summary
JOServer()
           
 
Method Summary
protected  void debugLog(java.lang.String logInfo)
          Debug to the regular http servlet log depending if server runs in debug mode.
 void doGet(com.ooit.jotunnel.HttpServletRequest req, com.ooit.jotunnel.HttpServletResponse res)
          The get functions prepares an info page for this servlet
 JOResponse doJO(JORequest request)
          This is the main call which is invoked from the JOServer servlet.
 void doPost(com.ooit.jotunnel.HttpServletRequest req, com.ooit.jotunnel.HttpServletResponse res)
          This functions is reading the JORequest object coming from the the client and creates a JOResponse object which is sent back to the client.
 boolean isCompressed()
          Getting the compression flag.
 boolean isDebug()
          Getting the debug flag.
protected  void setCompressed(boolean compressed)
          Setting the http communication to compressed.
protected  void setDebug(boolean debug)
          Setting the debug flag.
 

Field Detail

debug

public boolean debug
Constructor Detail

JOServer

public JOServer()
Method Detail

doGet

public void doGet(com.ooit.jotunnel.HttpServletRequest req,
                  com.ooit.jotunnel.HttpServletResponse res)
The get functions prepares an info page for this servlet

doPost

public void doPost(com.ooit.jotunnel.HttpServletRequest req,
                   com.ooit.jotunnel.HttpServletResponse res)
This functions is reading the JORequest object coming from the the client and creates a JOResponse object which is sent back to the client.

doJO

public JOResponse doJO(JORequest request)
This is the main call which is invoked from the JOServer servlet.

To add functionality to a subclass this method has to be overwritten.


debugLog

protected void debugLog(java.lang.String logInfo)
Debug to the regular http servlet log depending if server runs in debug mode.
Parameters:
logIngo - info string to log.

setDebug

protected void setDebug(boolean debug)
Setting the debug flag. Be aware: JOServer and JOClient need the same compression setting.
Parameters:
debug - the debug flag.

isDebug

public boolean isDebug()
Getting the debug flag.
Returns:
the debug flag.

setCompressed

protected void setCompressed(boolean compressed)
Setting the http communication to compressed.
Parameters:
compressed - compressed flag.

isCompressed

public boolean isCompressed()
Getting the compression flag.
Returns:
the compression flag.

JOtunnel by OOIT.com