Class Proxy

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--Proxy
All Implemented Interfaces:
java.lang.Runnable

public class Proxy
extends java.lang.Thread


Field Summary
static Config config
          The Config
static ConnectionPool cp
          The ConnectionPool for handling client connections
static Policy inPolicy
          IN/OUT authorization policies
static Logger log
          The logger
static Policy outPolicy
           
static ServConnectionManager scm
          The ServConnectionManager used for server Connections
static java.lang.String VERSION
          Current version
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Proxy(int port)
          Constructor, builds a Proxy instance running on the specified port number
 
Method Summary
protected  void closeSocket()
          Closes the serversocket and makes the proxy stop listening for connections.
static Connection getConnection()
          Get a Connection that is ready to service.
static java.net.InetAddress getHost()
          Get the local host.
 int getPort()
          Get the port this proxy is using.
 void kill()
          shutdown
protected  void openSocket()
          Open a socket on the specified port also make the proxy continue listening connections.
static void removeConnection(Connection con)
          Remove a connection (it has received full treatment)
 void run()
          while we can, accept new sockets, creating a handler for each and also save connections for statistics.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VERSION

public static final java.lang.String VERSION
Current version

cp

public static ConnectionPool cp
The ConnectionPool for handling client connections

scm

public static ServConnectionManager scm
The ServConnectionManager used for server Connections

log

public static Logger log
The logger

config

public static Config config
The Config

inPolicy

public static Policy inPolicy
IN/OUT authorization policies

outPolicy

public static Policy outPolicy
Constructor Detail

Proxy

public Proxy(int port)
Constructor, builds a Proxy instance running on the specified port number
Parameters:
port - the port number, where the Proxy should run
Method Detail

getConnection

public static Connection getConnection()
Get a Connection that is ready to service.

run

public void run()
while we can, accept new sockets, creating a handler for each and also save connections for statistics.
Overrides:
run in class java.lang.Thread

openSocket

protected void openSocket()
Open a socket on the specified port also make the proxy continue listening connections.

closeSocket

protected void closeSocket()
Closes the serversocket and makes the proxy stop listening for connections.

getPort

public int getPort()
Get the port this proxy is using.
Returns:
the port number the proxy is listening on.

getHost

public static java.net.InetAddress getHost()
Get the local host.
Returns:
the InetAddress of the host the proxy is running on.

removeConnection

public static void removeConnection(Connection con)
Remove a connection (it has received full treatment)
Parameters:
con - the connection that is closing down.

kill

public void kill()
shutdown