org.onebusaway.federations
Class FederatedServiceRegistration
java.lang.Object
org.onebusaway.federations.FederatedServiceRegistration
public class FederatedServiceRegistration
- extends Object
Periodically publishes service registration information to a
FederatedServiceRegistry
on a fixed interval. In combination with
FederatedServiceRegistryConstants.KEY_REGISTRATION_EXPIRES_AFTER
, we
can implement some basic fail-over capabilities in the service registry such
that a registry entry is automatically removed after a certain period of time
if the service hasn't been heard from in a while (ex. the service has
crashed).
- Author:
- bdferris
- See Also:
FederatedServiceRegistryConstants.KEY_REGISTRATION_EXPIRES_AFTER
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FederatedServiceRegistration
public FederatedServiceRegistration()
setRegistry
public void setRegistry(FederatedServiceRegistry registry)
setServiceUrl
public void setServiceUrl(String url)
setServiceClass
public void setServiceClass(Class<?> serviceClass)
setProperties
public void setProperties(Map<String,String> properties)
setUpdateFrequency
public void setUpdateFrequency(int updateFrequencyInSeconds)
setInitiallyEnabled
public void setInitiallyEnabled(boolean initiallyEnabled)
start
public void start()
stop
public void stop()
Copyright © 2012 OneBusAway. All Rights Reserved.