local.net
Class UdpMultiRelay

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--local.net.UdpMultiRelay
All Implemented Interfaces:
java.lang.Runnable

public class UdpMultiRelay
extends java.lang.Thread

UdpMultiRelay implements an UDP multiple relay agent. It receives UDP packets at a local port and relays them toward a list of remote UDP sockets (a list of address/port pairs).


Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
UdpMultiRelay(int local_port, java.util.Vector dest_sockets)
          Creates a new UDP relay and starts it
UdpMultiRelay(int local_port, java.util.Vector dest_sockets, org.zoolu.net.SocketAddress no_dest_socket)
          Creates a new UDP relay and starts it
 
Method Summary
 java.util.Vector getDestSockets()
          Gets the destination sockets
 int getLocalPort()
          Gets the local port
 org.zoolu.net.SocketAddress getNoRelayDestSocket()
          Gets the destination socket to which the packets must not be relayed
 int getSoTimeout()
          Gets the maximum time that the UDP relay can remain active after been halted
 void halt()
          Stops the UDP relay
 void run()
          Redirect packets from source addr/port to destination addr/port
 void setSoTimeout(int so_to)
          Sets the maximum time that the UDP relay can remain active after been halted
 
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
 

Constructor Detail

UdpMultiRelay

public UdpMultiRelay(int local_port,
                     java.util.Vector dest_sockets,
                     org.zoolu.net.SocketAddress no_dest_socket)
Creates a new UDP relay and starts it

UdpMultiRelay

public UdpMultiRelay(int local_port,
                     java.util.Vector dest_sockets)
Creates a new UDP relay and starts it
Method Detail

getLocalPort

public int getLocalPort()
Gets the local port

getDestSockets

public java.util.Vector getDestSockets()
Gets the destination sockets

getNoRelayDestSocket

public org.zoolu.net.SocketAddress getNoRelayDestSocket()
Gets the destination socket to which the packets must not be relayed

halt

public void halt()
Stops the UDP relay

setSoTimeout

public void setSoTimeout(int so_to)
Sets the maximum time that the UDP relay can remain active after been halted

getSoTimeout

public int getSoTimeout()
Gets the maximum time that the UDP relay can remain active after been halted

run

public void run()
Redirect packets from source addr/port to destination addr/port
Overrides:
run in class java.lang.Thread