Документ взят из кэша поисковой машины. Адрес оригинального документа : http://angel.cs.msu.su/projects/system/toolsdoc/netcdf_java/ucar/netcdf/RemoteNetcdf.html
Дата изменения: Tue Dec 28 20:59:06 2004
Дата индексирования: Sun Apr 10 00:15:25 2016
Кодировка:
: Class RemoteNetcdf

ucar.netcdf
Class RemoteNetcdf

java.lang.Object
  |
  +--ucar.netcdf.AbstractNetcdf
        |
        +--ucar.netcdf.RemoteNetcdf
All Implemented Interfaces:
Netcdf

public class RemoteNetcdf
extends AbstractNetcdf

A concrete implementation of the Netcdf interface, this class uses java rmi to access a remote Netcdf.

See Also:
Netcdf

Constructor Summary
RemoteNetcdf(NetcdfRemoteProxy remote)
          Given a NetcdfRemoteProxy, construct a RemoteNetcdf.
RemoteNetcdf(java.lang.String remoteHostName, java.lang.String dataSetName)
          Open up a remote Netcdf by name.
 
Method Summary
 void close()
          Indicate that you are done with this remote Netcdf.
protected  void finalize()
          Ensures that the remote resources associated with this are released when there are no more references to it.
static NetcdfService getNetcdfService(java.lang.String remoteHostName)
          Get remote dataset directory service from a given host.
protected  Accessor ioFactory(ProtoVariable proto)
          Used when creating variables to populate this.
static void main(java.lang.String[] args)
           
 
Methods inherited from class ucar.netcdf.AbstractNetcdf
add, contains, contains, get, getAttribute, getAttributes, getDimensions, initHashtable, iterator, putAttribute, putDimension, size, toCdl, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RemoteNetcdf

public RemoteNetcdf(NetcdfRemoteProxy remote)
             throws java.rmi.RemoteException
Given a NetcdfRemoteProxy, construct a RemoteNetcdf. The NetcdfRemoteProxy would be obtained from a directory service like NetcdfService.

RemoteNetcdf

public RemoteNetcdf(java.lang.String remoteHostName,
                    java.lang.String dataSetName)
             throws java.rmi.RemoteException,
                    java.rmi.NotBoundException,
                    java.net.MalformedURLException
Open up a remote Netcdf by name. The remote host needs to be running a NetcdfService which exports the data set.
Parameters:
remoteHostName - String host name or dotted quad
dataSetName - String name of the remote Netcdf
Method Detail

getNetcdfService

public static NetcdfService getNetcdfService(java.lang.String remoteHostName)
                                      throws java.rmi.RemoteException,
                                             java.rmi.NotBoundException,
                                             java.net.MalformedURLException
Get remote dataset directory service from a given host. Convience function which wraps java.rmi.Naming.lookup().
Parameters:
remoteHostName - String host name or dotted quad
Returns:
NetcdfService

close

public void close()
           throws java.rmi.RemoteException
Indicate that you are done with this remote Netcdf. Allows the service to free resources. We name this method close for symmetry with NetcdfFile. You do not have to call this. RMI runtime will eventually (~10 minutes?) call NetcdfRemoteProxyImpl.unreferenced() and accomplish the same thing.
See Also:
NetcdfRemoteProxy.release()

ioFactory

protected Accessor ioFactory(ProtoVariable proto)
                      throws java.lang.reflect.InvocationTargetException
Description copied from class: AbstractNetcdf
Used when creating variables to populate this. Override in your implementation to provide the correct i/o functionality.
Overrides:
ioFactory in class AbstractNetcdf

finalize

protected void finalize()
                 throws java.lang.Throwable
Ensures that the remote resources associated with this are released when there are no more references to it.
Overrides:
finalize in class java.lang.Object
See Also:
close()

main

public static void main(java.lang.String[] args)