com.adventnet.services.discovery
Class DiscoverySocket
java.lang.Object
java.net.DatagramSocket
java.net.MulticastSocket
com.adventnet.services.discovery.DiscoverySocket
- All Implemented Interfaces:
- java.lang.Runnable
class DiscoverySocket
- extends java.net.MulticastSocket
- implements java.lang.Runnable
| Methods inherited from class java.net.MulticastSocket |
getInterface, getLoopbackMode, getNetworkInterface, getTimeToLive, getTTL, joinGroup, joinGroup, leaveGroup, leaveGroup, send, setInterface, setLoopbackMode, setNetworkInterface, setTimeToLive, setTTL |
| Methods inherited from class java.net.DatagramSocket |
bind, close, connect, connect, disconnect, getBroadcast, getChannel, getInetAddress, getLocalAddress, getLocalPort, getLocalSocketAddress, getPort, getReceiveBufferSize, getRemoteSocketAddress, getReuseAddress, getSendBufferSize, getSoTimeout, getTrafficClass, isBound, isClosed, isConnected, receive, send, setBroadcast, setDatagramSocketImplFactory, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSoTimeout, setTrafficClass |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
group
java.net.InetAddress group
port
int port
ttl
int ttl
recvThread
java.lang.Thread recvThread
server
javax.management.MBeanServer server
toBeStopped
boolean toBeStopped
localHost
java.net.InetAddress localHost
service
DiscoveryService service
DiscoverySocket
public DiscoverySocket(DiscoveryService service,
javax.management.MBeanServer server,
java.lang.String mcGroup,
int mcPort,
int ttl)
throws java.lang.Exception
- Throws:
java.lang.Exception
DiscoverySocket
public DiscoverySocket(DiscoveryService service,
javax.management.MBeanServer server,
java.lang.String mcGroup,
int mcPort,
int ttl,
java.lang.String host)
throws java.lang.Exception
- Throws:
java.lang.Exception
joinTheGroup
public void joinTheGroup()
throws java.io.IOException
- Throws:
java.io.IOException
leaveTheGroup
public void leaveTheGroup()
throws java.io.IOException
- Throws:
java.io.IOException
getLocalHostAddress
public java.net.InetAddress getLocalHostAddress()
startService
public void startService()
throws java.lang.Exception
- Throws:
java.lang.Exception
stopService
public void stopService()
throws java.lang.Exception
- Throws:
java.lang.Exception
run
public void run()
- Specified by:
run in interface java.lang.Runnable
sendPacket
void sendPacket(DiscoveryPacket packet,
java.net.InetAddress group,
int port)
throws java.lang.Exception
- Throws:
java.lang.Exception
createDiscoveryPacket
DiscoveryPacket createDiscoveryPacket(java.net.InetAddress group,
int ttl,
java.lang.String agentName,
java.lang.String time)
getAdaptorsInfo
java.util.Hashtable getAdaptorsInfo()
receivePacket
DiscoveryPacket receivePacket()
throws java.lang.Exception
- Throws:
java.lang.Exception
processPacket
void processPacket(DiscoveryPacket pack)
throws java.lang.Exception
- Throws:
java.lang.Exception