Description: Each RemoteCommandManager has its own DiscoveryManager,
which handles the detection of other remote command services as they become available.
The DiscoveryManager is an active object (in that it extends Thread) and becomes
a separate thread when it is started using startDiscovery().

Discovery is done through the use of a multicast. Each discovery manager
joins the multicast group and announces itself to the group. As it receives
service announcements from other discovery managers it notifies the RCM to
establish connections to and from the new service.

getAnnouncementDelay()
Return the amount of time in millis that the service should wait between the time
that this Remote Service is available and a session announcement is sent out
to other discovery managers.

getPacketTimeToLive()
Returns the number of hops the data packets of the session annoucemnt will take before expiring.

boolean

isDiscoveryStopped()
ADVANCED:
Return true if discovery has been stopped at the time this method is called.

void

setAnnouncementDelay(int millisecondsToDelay)
Set the amount of time in millis that the service should wait between the time
that this Remote Service is available and a session announcement is sent out
to other discovery managers.

startDiscovery

stopDiscovery

ADVANCED:
Stop accepting announcements from other services becoming available.
Note that this does not remove the local service from the cluster.

isDiscoveryStopped

public boolean isDiscoveryStopped()

ADVANCED:
Return true if discovery has been stopped at the time this method is called.
If false is returned then it is undefined whether discovery is started or
stopped. It may be started, or it may be in the process of starting or
stopping.

setAnnouncementDelay

public void setAnnouncementDelay(int millisecondsToDelay)

Set the amount of time in millis that the service should wait between the time
that this Remote Service is available and a session announcement is sent out
to other discovery managers. This may be needed to give some systems more time
to post their connections into the naming service. Takes effect the next time
listening is started.

getAnnouncementDelay

public int getAnnouncementDelay()

Return the amount of time in millis that the service should wait between the time
that this Remote Service is available and a session announcement is sent out
to other discovery managers.

getMulticastGroupAddress

public java.lang.String getMulticastGroupAddress()

Return the host adddress of the multicast group.

setMulticastGroupAddress

public void setMulticastGroupAddress(java.lang.String address)

Set the host adddress of the multicast group. Takes effect the next time
listening is started.

setMulticastPort

public void setMulticastPort(int port)

Set the multicast port used for discovery. Takes effect the next time
listening is started.

getMulticastPort

public int getMulticastPort()

Return the multicast port used for discovery.

getPacketTimeToLive

public int getPacketTimeToLive()

Returns the number of hops the data packets of the session annoucemnt will take before expiring.
The default is 2, a hub and an interface card to prevent the data packets from leaving the localnetwork.

setPacketTimeToLive

public void setPacketTimeToLive(int newPacketTimeToLive)

Set the number of hops the data packets of the session annoucemnt will take before expiring.
The default is 2, a hub and an interface card to prevent the data packets from leaving the localnetwork.
Note that if sessions are hosted on different LANs that are part of WAN, the annoucment sending by one session
may not reach other sessions. In this case, consult your network administrator for the right time-to-live value
or test your network by increase the value until sessions receive announcement sent by others.