com.sun.media.jsdt.impl
Interface AbstractRegistry

All Known Implementing Classes:
Registry

public abstract interface AbstractRegistry

The Registry contains a transient database that maps names to JSDT objects. There are two types of JSDT object that can be stored in the Registry; a Session and a Client. When the Registry is first started, it's database is empty. The names stored in the Registry are pure and are not parsed. A collaborative service storing itself in the Registry may want to prefix the name of the service by a package name (although this is not required), to reduce name collisions in the Registry.

Version:
1.5 - 19th February 1999
Author:
Rich Burridge

Method Summary
 boolean registryExists(java.lang.String registryType, int port)
           is a class method that checks if a Registry, of the given registry type, is already running on the given port.
 void startRegistry(java.lang.String registryType, int port)
           startRegistry is a class method that will start a Registry of the appropriate type.
 void stopRegistry(java.lang.String registryType, int port)
           stopRegistry is a class method that will stop a Registry of the appropriate type.
 

Method Detail

startRegistry

public void startRegistry(java.lang.String registryType,
                          int port)
                   throws com.sun.media.jsdt.RegistryExistsException,
                          com.sun.media.jsdt.NoRegistryException
startRegistry is a class method that will start a Registry of the appropriate type. The Registry is started in a separate thread. It can be stopped with the stopRegistry method. If the process that started it terminates, then the Registry thread is terminated too.
Parameters:
registryType - the type of Registry to start.
port - the port number that the Registry should run on.
Throws:
com.sun.media.jsdt.RegistryExistsException - if a Registry (or some other process) is already running on the port used by the Registry on this machine.
com.sun.media.jsdt.NoRegistryException - if an invalid registry type was given.
Since:
JSDT 1.5

stopRegistry

public void stopRegistry(java.lang.String registryType,
                         int port)
                  throws com.sun.media.jsdt.NoRegistryException
stopRegistry is a class method that will stop a Registry of the appropriate type. The Registry was started in a separate thread. This method simply destroys that thread if it exists.
Parameters:
registryType - the type of Registry to start.
port - the port number that the Registry is running on.
Throws:
com.sun.media.jsdt.NoRegistryException - if an invalid registry type was given, or the Registry is not running, or wasn't started by the startRegistry method.
Since:
JSDT 1.5

registryExists

public boolean registryExists(java.lang.String registryType,
                              int port)
                       throws com.sun.media.jsdt.NoRegistryException
is a class method that checks if a Registry, of the given registry type, is already running on the given port.
Parameters:
registryType - the type of Registry to check on.
port - the port number that the Registry is running on.
Returns:
true if a Registry is already running; false if it isn't.
Throws:
com.sun.media.jsdt.NoRegistryException - if an invalid registry type was given.
Since:
JSDT 1.5