edu.sc.seis.sod.source.network
Class NetworkFinder

java.lang.Object
  extended by edu.sc.seis.sod.source.AbstractSource
      extended by edu.sc.seis.sod.source.network.AbstractNetworkSource
          extended by edu.sc.seis.sod.source.network.NetworkFinder
All Implemented Interfaces:
NetworkSource, Source
Direct Known Subclasses:
FilterNetworkFinder

public class NetworkFinder
extends AbstractNetworkSource


Field Summary
protected  java.util.List<CacheNetworkAccess> byNameCache
           
protected  VestingNetworkDC netDC
           
protected  java.util.List<CacheNetworkAccess> recentNetworksCache
           
 
Fields inherited from class edu.sc.seis.sod.source.network.AbstractNetworkSource
REFRESH_ELEMENT, refreshInterval
 
Constructor Summary
NetworkFinder(org.w3c.dom.Element element)
           
NetworkFinder(java.lang.String dns, java.lang.String name, int retries)
           
 
Method Summary
protected  CacheNetworkAccess checkCache(NetworkId netId)
           
protected  java.util.List<ChannelImpl> checkStationTimeOverlap(StationImpl station, Channel[] inChannels)
           
 java.util.List<ChannelImpl> getChannels(StationImpl station)
           
 Instrumentation getInstrumentation(ChannelId chanId)
           
 CacheNetworkAccess getNetwork(NetworkAttrImpl attr)
           
 CacheNetworkAccess getNetwork(NetworkId netId)
           
 java.util.List<CacheNetworkAccess> getNetworkByName(java.lang.String name)
           
 ProxyNetworkDC getNetworkDC()
           
 java.util.List<? extends NetworkAttrImpl> getNetworks()
           
 java.util.List<CacheNetworkAccess> getNetworksInternal()
           
 QuantityImpl getSensitivity(ChannelId chanId)
           
 java.util.List<StationImpl> getStations(NetworkId netId)
           
 void reset()
           
 
Methods inherited from class edu.sc.seis.sod.source.network.AbstractNetworkSource
getRefreshInterval
 
Methods inherited from class edu.sc.seis.sod.source.AbstractSource
getDNS, getFissuresNamingService, getName, getRetries
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.sc.seis.sod.source.Source
getDNS, getName
 

Field Detail

recentNetworksCache

protected java.util.List<CacheNetworkAccess> recentNetworksCache

byNameCache

protected java.util.List<CacheNetworkAccess> byNameCache

netDC

protected VestingNetworkDC netDC
Constructor Detail

NetworkFinder

public NetworkFinder(java.lang.String dns,
                     java.lang.String name,
                     int retries)

NetworkFinder

public NetworkFinder(org.w3c.dom.Element element)
              throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

getNetworkDC

public ProxyNetworkDC getNetworkDC()

getNetwork

public CacheNetworkAccess getNetwork(NetworkAttrImpl attr)
Specified by:
getNetwork in interface NetworkSource
Specified by:
getNetwork in class AbstractNetworkSource

getNetwork

public CacheNetworkAccess getNetwork(NetworkId netId)

getNetworkByName

public java.util.List<CacheNetworkAccess> getNetworkByName(java.lang.String name)
                                                    throws NetworkNotFound
Specified by:
getNetworkByName in interface NetworkSource
Specified by:
getNetworkByName in class AbstractNetworkSource
Throws:
NetworkNotFound

getNetworks

public java.util.List<? extends NetworkAttrImpl> getNetworks()
Specified by:
getNetworks in interface NetworkSource
Specified by:
getNetworks in class AbstractNetworkSource

getNetworksInternal

public java.util.List<CacheNetworkAccess> getNetworksInternal()

getStations

public java.util.List<StationImpl> getStations(NetworkId netId)
Specified by:
getStations in interface NetworkSource
Specified by:
getStations in class AbstractNetworkSource

getChannels

public java.util.List<ChannelImpl> getChannels(StationImpl station)
Specified by:
getChannels in interface NetworkSource
Specified by:
getChannels in class AbstractNetworkSource

getInstrumentation

public Instrumentation getInstrumentation(ChannelId chanId)
                                   throws ChannelNotFound,
                                          InvalidResponse
Specified by:
getInstrumentation in interface NetworkSource
Specified by:
getInstrumentation in class AbstractNetworkSource
Throws:
ChannelNotFound
InvalidResponse

getSensitivity

public QuantityImpl getSensitivity(ChannelId chanId)
                            throws ChannelNotFound,
                                   InvalidResponse
Specified by:
getSensitivity in interface NetworkSource
Specified by:
getSensitivity in class AbstractNetworkSource
Throws:
ChannelNotFound
InvalidResponse

checkStationTimeOverlap

protected java.util.List<ChannelImpl> checkStationTimeOverlap(StationImpl station,
                                                              Channel[] inChannels)

checkCache

protected CacheNetworkAccess checkCache(NetworkId netId)

reset

public void reset()