edu.sc.seis.fissuresUtil.cache
Class NSNetworkAccess

java.lang.Object
  extended by edu.sc.seis.fissuresUtil.cache.ProxyNetworkAccess
      extended by edu.sc.seis.fissuresUtil.cache.NSNetworkAccess
All Implemented Interfaces:
AuditSystemAccess, ConcreteNetworkAccessOperations, NetworkAccess, CorbaServerWrapper, java.io.Serializable, org.omg.CORBA.portable.IDLEntity

public class NSNetworkAccess
extends ProxyNetworkAccess

A NSNetworkAccess allows for the NetworkAccess reference inside of it to go stale by resetting the NetworkAccess to a fresh value from the netDC passed in in its constructor. A NSNetworkDC is probably a good choice for the type of netDC to pass in since it will also allow the NetworkDC itself to go stale and be refreshed from the naming service.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface edu.sc.seis.fissuresUtil.cache.CorbaServerWrapper
EVENTACCESS_TYPE, EVENTDC_TYPE, EVENTFINDER_TYPE, NETACCESS_TYPE, NETDC_TYPE, NETFINDER_TYPE, PLOTTABLEDC_TYPE, SEISDC_TYPE
 
Constructor Summary
NSNetworkAccess(NetworkId id, VestingNetworkFinder vnf)
          A ProxyNetworkAccess is not allowed as the NetworkAccess for this network access since calling reset on this will reset the network access from the netDC and the behaviour will change back to whatever is provided by the NetworkAccess returned by the netDC.
NSNetworkAccess(SynchronizedNetworkAccess na, NetworkId id, VestingNetworkFinder vnf)
           
 
Method Summary
 NetworkAttr get_attributes()
           
 java.lang.String getServerDNS()
           
 java.lang.String getServerName()
           
 Channel[] locate_channels(Area the_area, SamplingRange sampling, OrientationRange orientation)
           
 void reset()
          Refreshes the network from the network dc
 Channel retrieve_channel(ChannelId id)
           
 Channel[] retrieve_channels_by_code(java.lang.String station_code, java.lang.String site_code, java.lang.String channel_code)
           
 Channel[] retrieve_for_station(StationId p1)
           
 Station[] retrieve_stations()
           
protected  NetworkAttrImpl setSource(NetworkAttr attr)
           
 
Methods inherited from class edu.sc.seis.fissuresUtil.cache.ProxyNetworkAccess
a_writeable, get_audit_trail_for_channel, get_audit_trail_for_site, get_audit_trail_for_station, get_audit_trail, getCorbaObject, getFullName, getNetworkAccess, getServerType, retrieve_all_channels, retrieve_calibrations, retrieve_final_units, retrieve_grouping, retrieve_groupings, retrieve_initial_units, retrieve_instrumentation, retrieve_sensitivity, retrieve_time_corrections, setNetworkAccess, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NSNetworkAccess

public NSNetworkAccess(NetworkId id,
                       VestingNetworkFinder vnf)
                throws NetworkNotFound
A ProxyNetworkAccess is not allowed as the NetworkAccess for this network access since calling reset on this will reset the network access from the netDC and the behaviour will change back to whatever is provided by the NetworkAccess returned by the netDC.

Throws:
NetworkNotFound

NSNetworkAccess

public NSNetworkAccess(SynchronizedNetworkAccess na,
                       NetworkId id,
                       VestingNetworkFinder vnf)
Method Detail

reset

public void reset()
Refreshes the network from the network dc

Specified by:
reset in interface CorbaServerWrapper
Overrides:
reset in class ProxyNetworkAccess

setSource

protected NetworkAttrImpl setSource(NetworkAttr attr)

get_attributes

public NetworkAttr get_attributes()
Specified by:
get_attributes in interface NetworkAccess
Overrides:
get_attributes in class ProxyNetworkAccess

locate_channels

public Channel[] locate_channels(Area the_area,
                                 SamplingRange sampling,
                                 OrientationRange orientation)
Specified by:
locate_channels in interface NetworkAccess
Overrides:
locate_channels in class ProxyNetworkAccess

retrieve_channel

public Channel retrieve_channel(ChannelId id)
                         throws ChannelNotFound
Specified by:
retrieve_channel in interface NetworkAccess
Overrides:
retrieve_channel in class ProxyNetworkAccess
Throws:
ChannelNotFound

retrieve_channels_by_code

public Channel[] retrieve_channels_by_code(java.lang.String station_code,
                                           java.lang.String site_code,
                                           java.lang.String channel_code)
                                    throws ChannelNotFound
Specified by:
retrieve_channels_by_code in interface NetworkAccess
Overrides:
retrieve_channels_by_code in class ProxyNetworkAccess
Throws:
ChannelNotFound

retrieve_for_station

public Channel[] retrieve_for_station(StationId p1)
Specified by:
retrieve_for_station in interface NetworkAccess
Overrides:
retrieve_for_station in class ProxyNetworkAccess

retrieve_stations

public Station[] retrieve_stations()
Specified by:
retrieve_stations in interface NetworkAccess
Overrides:
retrieve_stations in class ProxyNetworkAccess

getServerDNS

public java.lang.String getServerDNS()
Specified by:
getServerDNS in interface CorbaServerWrapper
Overrides:
getServerDNS in class ProxyNetworkAccess

getServerName

public java.lang.String getServerName()
Specified by:
getServerName in interface CorbaServerWrapper
Overrides:
getServerName in class ProxyNetworkAccess