|
Oracle | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.compoze.util.MulticastDiscoveryClient
public class MulticastDiscoveryClient
This class provides a client which can discover a server by creating a multicast request.
Nested Class Summary | |
---|---|
class |
MulticastDiscoveryClient.Server
Class description. |
Constructor Summary | |
---|---|
MulticastDiscoveryClient(java.net.InetAddress multicastGroup,
int iPort,
int iMagicNumber)
Constructor. |
|
MulticastDiscoveryClient(java.net.InetAddress multicastGroup,
int iPort,
int iMagicNumber,
int iTimeToLive)
Constructor. |
Method Summary | |
---|---|
java.util.Collection |
discover()
Send a multicast request and return the first server that responds, using a timeout of 3 seconds. |
java.util.Collection |
discover(int iTimeout)
Send a multicast request and return the first server that responds. |
java.util.Collection |
discover(int iTimeout,
int iRetries)
Send a multicast request and return the first server that responds. |
protected void |
finalize()
Finalize. |
static void |
main(java.lang.String[] args)
Main. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MulticastDiscoveryClient(java.net.InetAddress multicastGroup, int iPort, int iMagicNumber, int iTimeToLive) throws java.io.IOException
multicastGroup
- the multicast groupiPort
- the multicast portiMagicNumber
- the magic numberiTimeToLive
- time to live for send packet
java.io.IOException
- if an i/o error occurredpublic MulticastDiscoveryClient(java.net.InetAddress multicastGroup, int iPort, int iMagicNumber) throws java.io.IOException
multicastGroup
- the multicast groupiPort
- the multicast portiMagicNumber
- the magic numberiTimeToLive
- time to live for send packet
java.io.IOException
- if an i/o error occurredMethod Detail |
---|
public java.util.Collection discover() throws java.io.IOException
iTimeout
- the number of milliseconds to wait before timing out
java.io.IOException
- if an i/o error occurredpublic java.util.Collection discover(int iTimeout) throws java.io.IOException
iTimeout
- the number of milliseconds to wait before timing outiRetries
- the number of retries to make
java.io.IOException
- if an i/o error occurredpublic java.util.Collection discover(int iTimeout, int iRetries) throws java.io.IOException
iTimeout
- the number of milliseconds to wait before timing outiRetries
- the number of retries to make
java.io.IOException
- if an i/o error occurredprotected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
- anything may be thrown in a finalizerpublic static void main(java.lang.String[] args)
args
- command line arguments
|
Oracle | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |