org.onebusaway.federations.impl
Class DynamicFederatedServiceCollectionImpl

java.lang.Object
  extended by org.onebusaway.federations.impl.AbstractFederatedServiceCollectionWrapperImpl
      extended by org.onebusaway.federations.impl.DynamicFederatedServiceCollectionImpl
All Implemented Interfaces:
FederatedServiceCollection

public class DynamicFederatedServiceCollectionImpl
extends AbstractFederatedServiceCollectionWrapperImpl

A dynamic FederatedServiceCollection implementation. Service instances are periodically queried from a FederatedServiceRegistry instance given a target service interface + parameters and our service collection is updated as is appropriate. It's assumed that all services published by the FederatedServiceRegistry have been exported as a Hessian rpc service, as we'll be using HessianProxyFactory to create proxy service instances from the service urls.

Author:
bdferris

Constructor Summary
DynamicFederatedServiceCollectionImpl()
           
 
Method Summary
protected  FederatedServiceCollection getCollection()
          Protected Methods
 void setQueryProperties(Map<String,String> queryProperties)
           
 void setRegistry(FederatedServiceRegistry registry)
           
 void setServiceInterface(Class<?> serviceInterface)
           
 void setUpdateFrequency(int updateFrequencyInSeconds)
           
 void start()
           
 void stop()
           
 
Methods inherited from class org.onebusaway.federations.impl.AbstractFederatedServiceCollectionWrapperImpl
getAllServices, getServiceForAgencyId, getServiceForAgencyIds, getServiceForBounds, getServiceForBounds, getServiceForLocation, getServiceForLocations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicFederatedServiceCollectionImpl

public DynamicFederatedServiceCollectionImpl()
Method Detail

setRegistry

public void setRegistry(FederatedServiceRegistry registry)

setUpdateFrequency

public void setUpdateFrequency(int updateFrequencyInSeconds)

setServiceInterface

public void setServiceInterface(Class<?> serviceInterface)

setQueryProperties

public void setQueryProperties(Map<String,String> queryProperties)

start

@PostConstruct
public void start()

stop

@PreDestroy
public void stop()

getCollection

protected FederatedServiceCollection getCollection()
Description copied from class: AbstractFederatedServiceCollectionWrapperImpl
Protected Methods

Specified by:
getCollection in class AbstractFederatedServiceCollectionWrapperImpl


Copyright © 2012 OneBusAway. All Rights Reserved.