JAPI 0.9.0
Yet another Java API
API Documentation

net.sf.japi.net
Class Forwarder

java.lang.Object
  extended by net.sf.japi.net.Forwarder
All Implemented Interfaces:
Runnable

public class Forwarder
extends Object
implements Runnable

This class forwards incoming TCP connections to another host and port.

Author:
Christian Hujer

Constructor Summary
Forwarder(Socket s1, Socket s2)
          Create a new Forwarder.
 
Method Summary
static void main(String... args)
          Main program.
 void run()
          When an object implementing interface Runnable is used to create a thread, starting the thread causes the object's run method to be called in that separately executing thread.
 void start()
          Start the forwarder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Forwarder

public Forwarder(Socket s1,
                 Socket s2)
Create a new Forwarder.

Parameters:
s1 - first socket
s2 - second socket
Method Detail

main

public static void main(String... args)
                 throws IOException
Main program.

Parameters:
args - command line arguments (currently ignored)
Throws:
IOException

start

public void start()
Start the forwarder.


run

public void run()
When an object implementing interface Runnable is used to create a thread, starting the thread causes the object's run method to be called in that separately executing thread.

The general contract of the method run is that it may take any action whatsoever.

Specified by:
run in interface Runnable
See Also:
Thread.run()

JAPI
Yet another Java API
API Documentation

© 2005-2006 Christian Hujer. All rights reserved. See copyright