stsci.server
Class ArchiveServerImp

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
                    |
                    +--stsci.server.ArchiveServerImp
All Implemented Interfaces:
ArchiveServer, java.rmi.Remote, java.io.Serializable
Direct Known Subclasses:
JiniArcServ

public class ArchiveServerImp
extends java.rmi.server.UnicastRemoteObject
implements ArchiveServer

This uses the ADfactory to get the list of archive descriptors. It also has a main which allows it to run as an RMI server. Remember that for servers RMIC must be run on them e.g. rmic stsci.server.ArchiveServerImp

See Also:
Serialized Form

Field Summary
protected  ArchiveDescriptor[] descriptors
           
protected  java.rmi.registry.Registry reg
           
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
ArchiveServerImp()
           
 
Method Summary
 ArchiveDescriptor[] listArchives()
          List the names of the known archives.
 void loadDescriptors()
          Load the descriptors from a file.
static void main(java.lang.String[] argv)
          Create an ArchiveServerImp and register it.
 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

descriptors

protected ArchiveDescriptor[] descriptors

reg

protected java.rmi.registry.Registry reg
Constructor Detail

ArchiveServerImp

public ArchiveServerImp()
                 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.

main

public static void main(java.lang.String[] argv)
Create an ArchiveServerImp and register it.

listArchives

public ArchiveDescriptor[] listArchives()
                                 throws java.rmi.RemoteException
Description copied from interface: ArchiveServer
List the names of the known archives. This could probly be held in a properties file.
Specified by:
listArchives in interface ArchiveServer

loadDescriptors

public void loadDescriptors()
                     throws java.lang.Exception
Load the descriptors from a file. Specify the file name in the stsci.properties SERVER_FILE.