ucar.netcdf
Class NetcdfRemoteProxyImpl

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by ucar.netcdf.NetcdfRemoteProxyImpl
All Implemented Interfaces:
java.io.Serializable, java.rmi.Remote, java.rmi.server.Unreferenced, NetcdfRemoteProxy

public class NetcdfRemoteProxyImpl
extends java.rmi.server.RemoteObject
implements NetcdfRemoteProxy, java.rmi.server.Unreferenced

This class provides implementation of the interface NetcdfRemoteProxy. It wraps a single instance of Netcdf provide Remote services required in the construction of an instance of RemoteNetcdf.

See Also:
NetcdfRemoteProxy, Serialized Form

Field Summary
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
NetcdfRemoteProxyImpl(NetcdfServer svr, java.lang.String key, AbstractNetcdf nc)
          Construct a RemoteObject which acts as a NetcdfRemoteProxy for a single Netcdf.
 
Method Summary
protected  void _release()
           
protected  void finalize()
           
 RemoteAccessor getAccessor(java.lang.String varName)
          Get an Accessor for a Variable, by name.
 Schema getSchema()
           
 void release()
          Indicate that you are done with this Netcdf data set.
 void unreferenced()
          Equivalent to release(), called automatically by the runtime system.
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NetcdfRemoteProxyImpl

public NetcdfRemoteProxyImpl(NetcdfServer svr,
                             java.lang.String key,
                             AbstractNetcdf nc)
                      throws java.rmi.RemoteException
Construct a RemoteObject which acts as a NetcdfRemoteProxy for a single Netcdf.

Parameters:
svr - NetcdfServer which owns this.
key - String by which svr knows us.
nc - Netcdf which this will represent.
Throws:
java.rmi.RemoteException
Method Detail

getSchema

public Schema getSchema()
                 throws java.rmi.RemoteException
Specified by:
getSchema in interface NetcdfRemoteProxy
Returns:
a Schema for the Netcdf this represents.
Throws:
java.rmi.RemoteException

getAccessor

public RemoteAccessor getAccessor(java.lang.String varName)
                           throws java.rmi.RemoteException
Description copied from interface: NetcdfRemoteProxy
Get an Accessor for a Variable, by name. Given the Accessor and the ProtoVariable obtained indirectly from getSchema() above, RemoteNetcdf can create a remote proxy for the Variable.

Specified by:
getAccessor in interface NetcdfRemoteProxy
Parameters:
varName - String which names a Variable in the Netcdf this represents.
Returns:
a (Remote)Accessor for the Variable.
Throws:
java.rmi.RemoteException

release

public void release()
             throws java.rmi.RemoteException
Description copied from interface: NetcdfRemoteProxy
Indicate that you are done with this Netcdf data set. Allows the service to free resources (close the data set).

Specified by:
release in interface NetcdfRemoteProxy
Throws:
java.rmi.RemoteException

unreferenced

public void unreferenced()
Equivalent to release(), called automatically by the runtime system.

Specified by:
unreferenced in interface java.rmi.server.Unreferenced
See Also:
Unreferenced.unreferenced(), NetcdfRemoteProxy.release()

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable

_release

protected void _release()