public class ClientServerInteractionManager
extends java.lang.Object
implements net.jini.discovery.DiscoveryListener, net.jini.lookup.ServiceDiscoveryListener
Constructor and Description |
---|
ClientServerInteractionManager(boolean verbose)
Construct a ClientServerInteractionManager initializing it with a given
VERBOSE option.
|
Modifier and Type | Method and Description |
---|---|
void |
discarded(net.jini.discovery.DiscoveryEvent evt)
Required by DiscoveryListener interface.
|
void |
discovered(net.jini.discovery.DiscoveryEvent evt)
Required by DiscoveryListener interface.
|
java.util.LinkedList |
getServices()
Returns the list of alive services.
|
void |
init(java.lang.String configFileName)
Initializes the ClientServerInteractionManager.
|
void |
serviceAdded(net.jini.lookup.ServiceDiscoveryEvent evt)
Required by ServiceDiscoveryListener interface.
|
void |
serviceChanged(net.jini.lookup.ServiceDiscoveryEvent evt)
Required by ServiceDiscoveryListener interface.
|
void |
serviceRemoved(net.jini.lookup.ServiceDiscoveryEvent evt)
Required by ServiceDiscoveryListener interface.
|
void |
setRequiredServices(int requiredServices)
Specify the number of required services.
|
public ClientServerInteractionManager(boolean verbose)
verbose
- If true, flag messages will be printed in the standard
output.public void discarded(net.jini.discovery.DiscoveryEvent evt)
discarded
in interface net.jini.discovery.DiscoveryListener
evt
- The event that describes the discarded registrarspublic void discovered(net.jini.discovery.DiscoveryEvent evt)
discovered
in interface net.jini.discovery.DiscoveryListener
evt
- The event that describes the discovered registrarspublic java.util.LinkedList getServices()
public void init(java.lang.String configFileName)
configFileName
- String containing the name and/or path of the
configuration file to be loaded.public void serviceAdded(net.jini.lookup.ServiceDiscoveryEvent evt)
serviceAdded
in interface net.jini.lookup.ServiceDiscoveryListener
evt
- a ServiceDiscoveryEvent object containing references to the
service item corresponding to the event, including representations of
the service's state both before and after the event.public void serviceChanged(net.jini.lookup.ServiceDiscoveryEvent evt)
serviceChanged
in interface net.jini.lookup.ServiceDiscoveryListener
evt
- a ServiceDiscoveryEvent object containing references to the
service item corresponding to the event, including representations of
the service's state both before and after the event.public void serviceRemoved(net.jini.lookup.ServiceDiscoveryEvent evt)
serviceRemoved
in interface net.jini.lookup.ServiceDiscoveryListener
evt
- a ServiceDiscoveryEvent object containing references to the
service item corresponding to the event, including representations of
the service's state both before and after the event.public void setRequiredServices(int requiredServices)
requiredServices
- The number of requiredServices.