compbio.ws.server
Class RegistryWS

java.lang.Object
  extended by compbio.ws.server.RegistryWS
All Implemented Interfaces:
JABAService, RegistryWS

public class RegistryWS
extends Object
implements RegistryWS, JABAService

JABAWS services registry

Author:
pvtroshin

Field Summary
 
Fields inherited from interface compbio.data.msa.JABAService
SERVICE_NAMESPACE, V2_SERVICE_NAMESPACE
 
Constructor Summary
RegistryWS()
           
 
Method Summary
 int getLastTested(Services service)
          Number of seconds since the last test.
 Date getLastTestedOn(Services service)
          Can potentially return null if the service has not been tested yet.
 Set<Services> getSupportedServices()
          List of services that are functioning on the server.
 boolean isOperating(Services service)
          Check whether a particular web service is working on this server
 String testAllServices()
          TODO improve reporting.
 String testService(Services service)
          Test a particular service
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegistryWS

public RegistryWS()
Method Detail

getSupportedServices

public Set<Services> getSupportedServices()
Description copied from interface: RegistryWS
List of services that are functioning on the server. This function returns the results of testing performed some time ago by RegistryWS.testAllServices() or RegistryWS.testService(Services) methods. The time of last check can be obtained from RegistryWS.getLastTestedOn(Services) method

Specified by:
getSupportedServices in interface RegistryWS
Returns:
the Set of Services which are functioning on the server
See Also:
RegistryWS.testAllServices()

getLastTested

public int getLastTested(Services service)
Description copied from interface: RegistryWS
Number of seconds since the last test. Returns 0 if the service was not tested or tested less then a one second ago.

Specified by:
getLastTested in interface RegistryWS
Returns:
when last time tested

getLastTestedOn

public Date getLastTestedOn(Services service)
Can potentially return null if the service has not been tested yet.

Specified by:
getLastTestedOn in interface RegistryWS
Returns:
the Date and time on which the service was last tested

testAllServices

public String testAllServices()
TODO improve reporting. stop testing service on unsupported runtime env exception

Specified by:
testAllServices in interface RegistryWS
Returns:
the test log

testService

public String testService(Services service)
Description copied from interface: RegistryWS
Test a particular service

Specified by:
testService in interface RegistryWS
Returns:
the testing log

isOperating

public boolean isOperating(Services service)
Description copied from interface: RegistryWS
Check whether a particular web service is working on this server

Specified by:
isOperating in interface RegistryWS
Returns:
true if the service was functioning in time of last testing.