synergynetframework.appsystem.services.net.peer
Class ServerStatusMonitor

java.lang.Object
  extended by synergynetframework.appsystem.services.net.peer.ServerStatusMonitor
All Implemented Interfaces:
ServiceDiscoveryListener

public class ServerStatusMonitor
extends java.lang.Object
implements ServiceDiscoveryListener

The Class ServerStatusMonitor.


Constructor Summary
ServerStatusMonitor(java.lang.String serviceType, java.lang.String serviceName, long timeOut)
          Instantiates a new server status monitor.
 
Method Summary
 void connect()
          Connect.
 ServiceDescriptor getServerServiceDescriptor()
          Gets the server service descriptor.
 boolean serverFound()
          Server found.
 void serviceAvailable(ServiceDescriptor sd)
          Service available.
 void serviceRemoved(ServiceDescriptor sd)
          Service removed.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerStatusMonitor

public ServerStatusMonitor(java.lang.String serviceType,
                           java.lang.String serviceName,
                           long timeOut)
Instantiates a new server status monitor.

Parameters:
serviceType - the service type
serviceName - the service name
timeOut - the time out
Method Detail

connect

public void connect()
             throws java.lang.InterruptedException
Connect.

Throws:
java.lang.InterruptedException - the interrupted exception

getServerServiceDescriptor

public ServiceDescriptor getServerServiceDescriptor()
Gets the server service descriptor.

Returns:
the server service descriptor

serverFound

public boolean serverFound()
Server found.

Returns:
true, if successful

serviceAvailable

public void serviceAvailable(ServiceDescriptor sd)
Description copied from interface: ServiceDiscoveryListener
Service available.

Specified by:
serviceAvailable in interface ServiceDiscoveryListener
Parameters:
sd - the descriptor

serviceRemoved

public void serviceRemoved(ServiceDescriptor sd)
Description copied from interface: ServiceDiscoveryListener
Service removed.

Specified by:
serviceRemoved in interface ServiceDiscoveryListener
Parameters:
sd - the descriptor