org.onebusaway.federations
Class FederatedServiceRegistration

java.lang.Object
  extended by 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

Constructor Summary
FederatedServiceRegistration()
           
 
Method Summary
 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()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FederatedServiceRegistration

public FederatedServiceRegistration()
Method Detail

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.