CADI.Proxy.Core
Class TransparentProxy

java.lang.Object
  extended by CADI.Proxy.Core.TransparentProxy

public class TransparentProxy
extends java.lang.Object

This class implements a simple transparent proxy. It reads a request sent by a client which is forwarded to the JPIP server waiting for the server response to be forwarded to the client.

Usage example:
  construct
  run

Version:
1.0 2009/08/22
Author:
Group on Interactive Coding of Images (GICI)

Field Summary
private  HTTPRequest httpRequest
          Definition in HTTPRequest.
private  CADILog log
          It is an object that will be used to log the server process
private  java.net.Socket socketToClient
          Contains the client socket of which request is being processed.
 
Constructor Summary
TransparentProxy(java.net.Socket socketToClient, HTTPRequest httpRequest, CADILog log)
          Constructor.
 
Method Summary
 void run()
          Performs the forwarding of the client request to the server and the forwarding of the server response to the client.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

socketToClient

private java.net.Socket socketToClient
Contains the client socket of which request is being processed.


httpRequest

private HTTPRequest httpRequest
Definition in HTTPRequest.


log

private CADILog log
It is an object that will be used to log the server process

Constructor Detail

TransparentProxy

public TransparentProxy(java.net.Socket socketToClient,
                        HTTPRequest httpRequest,
                        CADILog log)
Constructor.

Parameters:
clientSocket - definition in socketToClient.
httpRequest - definition in httpRequest.
log - definition in log.
Method Detail

run

public void run()
         throws ErrorException,
                WarningException,
                java.io.IOException
Performs the forwarding of the client request to the server and the forwarding of the server response to the client.

Throws:
java.io.IOException
ErrorException
WarningException


CADI - Copyright (C) 2007
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Group on Interactive Coding of Images (GICI) (contact)