JOtunnel by OOIT.com

com.ooit.jotunnel
Class JOClient

java.lang.Object
  |
  +--com.ooit.jotunnel.JOClient

public class JOClient
extends java.lang.Object

The JOTunnel client.

This class serves as a proxi to a JOServer.

The client is initialized with the the servers (servlets) URL.

A request is sent to the server with the JOResponse doJO(JORequest jorequest) call. Each call is opening and closing the connection to the HTTP server.

The HTTP communication can be done with standard ZIP compression.


Field Summary
protected  boolean compressed
           
protected  boolean debug
           
 
Constructor Summary
JOClient(java.net.URL joServerUrl)
          Creating an object with the JO server servlet's URL.
 
Method Summary
 JOResponse doJO(JORequest jorequest)
          Sending a request object to the JO server and returning the response.
 boolean isCompressed()
          Getting the compression flag.
 boolean isDebug()
          Getting the debug flag.
 void setCompressed(boolean compressed)
          Setting the http communication to compressed.
 void setDebug(boolean debug)
          Setting the debug flag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

protected boolean debug

compressed

protected boolean compressed
Constructor Detail

JOClient

public JOClient(java.net.URL joServerUrl)
Creating an object with the JO server servlet's URL.
Parameters:
joServerUrl - the JO server url.
Method Detail

doJO

public JOResponse doJO(JORequest jorequest)
                throws java.io.IOException
Sending a request object to the JO server and returning the response.
Parameters:
jorequest - the JO request object to be sent to the JO server.
Returns:
the JO response object from the JO server.

setDebug

public void setDebug(boolean debug)
Setting the debug flag.
Parameters:
debug - the debug flag.

isDebug

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

setCompressed

public void setCompressed(boolean compressed)
Setting the http communication to compressed.

Be aware: JOServer and JOClient need the same compression setting.

Parameters:
compressed - compressed flag.

isCompressed

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

JOtunnel by OOIT.com