org.abstracthorizon.danube.proxy.socket
Class Proxy

java.lang.Object
  extended by org.abstracthorizon.danube.proxy.socket.Proxy
All Implemented Interfaces:
Runnable

public class Proxy
extends Object
implements Runnable

Author:
Daniel Sendula

Nested Class Summary
static interface Proxy.Connection
           
protected static class Proxy.ControlConnection
           
protected static class Proxy.ControlPort
           
protected static interface Proxy.PortProcessor
           
static class Proxy.ProxyConnection
           
protected static class Proxy.ProxyPort
           
 
Constructor Summary
Proxy()
          Constructor.
Proxy(InetSocketAddress controlPortAddress)
          Constructor.
Proxy(int port)
           
Proxy(String host, int port)
           
 
Method Summary
 void deregisterInetAddress(InetSocketAddress sourceSocketAddress, InetSocketAddress destinationSocketAddress)
           
 InetSocketAddress getControlPortAddress()
           
 Executor getExecutor()
           
static void main(String[] args)
           
 void registerInetAddress(InetSocketAddress sourceSocketAddress, InetSocketAddress destinationSocketAddress)
           
 void run()
          Main method.
 void setControlPortAddress(InetSocketAddress controlPortAddress)
           
 void setExecutor(Executor executor)
           
 void start()
          Starts the service.
 void stop()
          Stops the service.
static InetSocketAddress stringToInetSocketAddress(String socketAddress)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Proxy

public Proxy()
Constructor.


Proxy

public Proxy(InetSocketAddress controlPortAddress)
Constructor.

Parameters:
controlPortAddress - control port address

Proxy

public Proxy(int port)

Proxy

public Proxy(String host,
             int port)
Method Detail

setControlPortAddress

public void setControlPortAddress(InetSocketAddress controlPortAddress)

getControlPortAddress

public InetSocketAddress getControlPortAddress()

setExecutor

public void setExecutor(Executor executor)

getExecutor

public Executor getExecutor()

start

public void start()
           throws IOException
Starts the service.

Throws:
IOException

stop

public void stop()
Stops the service.


registerInetAddress

public void registerInetAddress(InetSocketAddress sourceSocketAddress,
                                InetSocketAddress destinationSocketAddress)
                         throws IOException
Throws:
IOException

deregisterInetAddress

public void deregisterInetAddress(InetSocketAddress sourceSocketAddress,
                                  InetSocketAddress destinationSocketAddress)
                           throws IOException
Throws:
IOException

stringToInetSocketAddress

public static InetSocketAddress stringToInetSocketAddress(String socketAddress)

run

public void run()
Main method.

Specified by:
run in interface Runnable

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception


Copyright © 2005-2009 Abstract Horizon. All Rights Reserved.