stsci.server
Class FileArchive

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
                    |
                    +--stsci.server.FileArchive
All Implemented Interfaces:
Archive, java.rmi.Remote, java.io.Serializable
Direct Known Subclasses:
ImageFileArchive, SourceFileArchive

public class FileArchive
extends java.rmi.server.UnicastRemoteObject
implements Archive

This is a general RMI server for file based archives. Remember to run rmic on this otherwise it will not work. Pass the name for this archive and the FactoryName on the command line. This just saves developers from having to write servers now one only needs to write a factory. * @author

See Also:
Serialized Form

Field Summary
protected  java.lang.String cmd
           
protected  java.lang.Class factory
          The factory class we need.
protected  java.lang.String factoryName
           
protected  java.lang.String name
           
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
FileArchive(java.lang.String facName, java.lang.String cmd, java.lang.String name)
          Pass the factory class name the command for the factory and the name for this server to the constructor - these will have to be passed on the command line tot he main loop.
 
Method Summary
static void main(java.lang.String[] argv)
          Create an ArchiveServerImp and register it.
 java.lang.String name()
          The name of this archive - location also ?
 void register()
          Refister this object with the RMI registry.
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
, clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

factoryName

protected java.lang.String factoryName

cmd

protected java.lang.String cmd

factory

protected java.lang.Class factory
The factory class we need. * @author

name

protected java.lang.String name
Constructor Detail

FileArchive

public FileArchive(java.lang.String facName,
                   java.lang.String cmd,
                   java.lang.String name)
            throws java.lang.Exception
Pass the factory class name the command for the factory and the name for this server to the constructor - these will have to be passed on the command line tot he main loop. * @param facName
Parameters:
cmd -  
name -  
Throws:
java.lang.Exception -  
Method Detail

register

public void register()
              throws java.lang.Exception
Refister this object with the RMI registry. Start the registry if one is not running. The port number and name to biund are in the properties file. * @return void
Throws:
java.lang.Exception -  

main

public static void main(java.lang.String[] argv)
Create an ArchiveServerImp and register it. * @param argv[]
Returns:
void
Throws:
-  

name

public java.lang.String name()
                      throws ArchiveException,
                             java.rmi.RemoteException
Description copied from interface: Archive
The name of this archive - location also ?
Specified by:
name in interface Archive
Returns:
String
Throws:
ArchiveException,RemoteException -