Compoze Software, Inc.

com.compoze.util
Class MulticastDiscoveryServer

java.lang.Object
  extended byjava.lang.Thread
      extended bycom.compoze.util.MulticastDiscoveryServer
All Implemented Interfaces:
java.lang.Runnable

public class MulticastDiscoveryServer
extends java.lang.Thread

This class is a server that accepts multicast requests and responds with an IP address and port.


Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
MulticastDiscoveryServer(java.net.InetAddress multicastGroup, int iListenPort, java.net.InetAddress respondAddress, int iRespondPort, int iMagicNumber)
          Constructor.
MulticastDiscoveryServer(java.net.InetAddress multicastGroup, int iListenPort, int iRespondPort, int iMagicNumber)
          Constructor.
 
Method Summary
static void main(java.lang.String[] args)
          Main.
 void run()
          Thread run.
 void stopThread()
          Stop the discovery listener thread.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, 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

MulticastDiscoveryServer

public MulticastDiscoveryServer(java.net.InetAddress multicastGroup,
                                int iListenPort,
                                int iRespondPort,
                                int iMagicNumber)
                         throws java.net.UnknownHostException,
                                java.io.IOException
Constructor.

Parameters:
multicastGroup - the multicast group
iListenPort - the multicast listen port
iRespondPort - the port to respond with
iMagicNumber - the magic number to listen for
Throws:
java.io.IOException - if an i/o error occurred
java.net.UnknownHostException - if the local host could not be found

MulticastDiscoveryServer

public MulticastDiscoveryServer(java.net.InetAddress multicastGroup,
                                int iListenPort,
                                java.net.InetAddress respondAddress,
                                int iRespondPort,
                                int iMagicNumber)
                         throws java.io.IOException
Constructor.

Parameters:
multicastGroup - the multicast group
iListenPort - the multicast listen port
respondAddress - the address to respond with
iRespondPort - the port to respond with
iMagicNumber - the magic number to listen for
Throws:
java.io.IOException - if an i/o error occurred
java.net.UnknownHostException - if the local host could not be found
Method Detail

run

public void run()
Thread run.


stopThread

public void stopThread()
Stop the discovery listener thread.


main

public static void main(java.lang.String[] args)
Main.

Parameters:
args - command line arguments

Compoze Software, Inc.

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.