Package org.onebusaway.federations
Class FederatedServiceRegistration
- java.lang.Object
-
- org.onebusaway.federations.FederatedServiceRegistration
-
public class FederatedServiceRegistration extends Object
Periodically publishes service registration information to aFederatedServiceRegistry
on a fixed interval. In combination withFederatedServiceRegistryConstants.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
-
-
Constructor Summary
Constructors Constructor Description FederatedServiceRegistration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setInitiallyEnabled(boolean initiallyEnabled)
void
setProperties(Map<String,String> properties)
void
setRegistry(FederatedServiceRegistry registry)
void
setServiceClass(Class<?> serviceClass)
void
setServiceUrl(String url)
void
setUpdateFrequency(int updateFrequencyInSeconds)
void
start()
void
stop()
-
-
-
Method Detail
-
setRegistry
public void setRegistry(FederatedServiceRegistry registry)
-
setServiceUrl
public void setServiceUrl(String url)
-
setServiceClass
public void setServiceClass(Class<?> serviceClass)
-
setUpdateFrequency
public void setUpdateFrequency(int updateFrequencyInSeconds)
-
setInitiallyEnabled
public void setInitiallyEnabled(boolean initiallyEnabled)
-
start
public void start()
-
stop
public void stop()
-
-