ucar.netcdf
Class NetcdfServer

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.server.UnicastRemoteObject
              extended by ucar.netcdf.NetcdfServer
All Implemented Interfaces:
java.io.Serializable, java.rmi.Remote, NetcdfService

public class NetcdfServer
extends java.rmi.server.UnicastRemoteObject
implements NetcdfService

A UnicastRemoteObject implementation of NetcdfService.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Fields inherited from interface ucar.netcdf.NetcdfService
SVC_NAME
 
Constructor Summary
NetcdfServer(java.lang.String[] exports, java.rmi.registry.Registry registry)
           
 
Method Summary
static java.rmi.registry.Registry checkRegistry(java.rmi.registry.Registry regis, int tryagain)
           
 void export(java.io.File ff)
           
 void export(java.lang.String path)
           
protected  void finalize()
           
 java.lang.String[] list()
          List the names of exported data sets.
 NetcdfRemoteProxy lookup(java.lang.String dataSetName)
          Connect to (open) a remote Netcdf dataSet by name.
static void main(java.lang.String[] args)
           
 int ping()
          Test if the service is alive.
static void setLog(java.io.OutputStream out)
           
static java.rmi.registry.Registry startRegistry()
           
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NetcdfServer

public NetcdfServer(java.lang.String[] exports,
                    java.rmi.registry.Registry registry)
             throws java.rmi.RemoteException,
                    java.rmi.AlreadyBoundException
Throws:
java.rmi.RemoteException
java.rmi.AlreadyBoundException
Method Detail

setLog

public static void setLog(java.io.OutputStream out)

ping

public int ping()
         throws java.rmi.RemoteException
Description copied from interface: NetcdfService
Test if the service is alive. Used by the automatic registration feature of the NetcdfServer implementation.

Specified by:
ping in interface NetcdfService
Returns:
0
Throws:
java.rmi.RemoteException

lookup

public NetcdfRemoteProxy lookup(java.lang.String dataSetName)
                         throws java.rmi.RemoteException
Description copied from interface: NetcdfService
Connect to (open) a remote Netcdf dataSet by name. If the name is not the same as one obtainable from the list() opteration on this service, then this method will fail.

Specified by:
lookup in interface NetcdfService
Parameters:
dataSetName - String name of the remote Netcdf
Returns:
NetcdfRemoteProxy which can be used to create an instance of RemoteNetcdf.
Throws:
java.rmi.RemoteException

list

public java.lang.String[] list()
                        throws java.rmi.RemoteException
Description copied from interface: NetcdfService
List the names of exported data sets.

Specified by:
list in interface NetcdfService
Throws:
java.rmi.RemoteException

export

public void export(java.io.File ff)

export

public void export(java.lang.String path)

finalize

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

startRegistry

public static java.rmi.registry.Registry startRegistry()
                                                throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

checkRegistry

public static java.rmi.registry.Registry checkRegistry(java.rmi.registry.Registry regis,
                                                       int tryagain)
                                                throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

main

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