## 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(String remoteHostName, 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(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(String[] args)`

Methods inherited from class ucar.netcdf.AbstractNetcdf
`add, contains, contains, get, getAttribute, getAttributes, getDimensions, getSchema, indexOf, initHashtable, iterator, putAttribute, putDimension, size, toCdl, toString, varCtorParameterTypes`

Methods inherited from class java.lang.Object
`clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### RemoteNetcdf

    public RemoteNetcdf(NetcdfRemoteProxy remote)
                 throws RemoteException

  Given a NetcdfRemoteProxy, construct a RemoteNetcdf. The NetcdfRemoteProxy would be obtained from a directory service like NetcdfService.

### RemoteNetcdf

    public RemoteNetcdf(String remoteHostName,
                        String dataSetName)
                 throws RemoteException,
                        NotBoundException,
                        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(String remoteHostName)
                                          throws RemoteException,
                                                 NotBoundException,
                                                 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
  Throws:
    `RemoteException`
    `NotBoundException`
    `MalformedURLException`

### close

    public void close()
               throws 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.

  Throws:
    `RemoteException`
  See Also:
    `NetcdfRemoteProxy.release()`

### ioFactory

    protected Accessor ioFactory(ProtoVariable proto)
                          throws InvocationTargetException

  Description copied from class: `AbstractNetcdf`
  Used when creating variables to populate this. Override in your implementation to provide the correct i/o functionality.

  Specified by:
    `ioFactory` in class `AbstractNetcdf`
  Throws:
    `InvocationTargetException`

### finalize

    protected void finalize()
                     throws Throwable

  Ensures that the remote resources associated with this are released when there are no more references to it.

  Throws:
    `Throwable`
  See Also:
    `close()`

### main

    public static void main(String[] args)