|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.media.jsdt.impl.JSDTObject | +--com.sun.media.jsdt.RegistryFactory
This is a factory class that starts and stops a Registry of the appropriate type. Valid types are "socket", "http", "lrmp" and "rmi".
As with all types of collaborative environments, there needs to be some way for each application to initially rendezvous, so that data can be shared. The JSDT group rendezvous point is a Session object, and a special URL String is used to describe that Session. This Session information needs to be kept somewhere that is easily accessable to all applications. This is where the Registry fits in.
The Registry contains a transient database that maps these URL Strings to JSDT objects. 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.
The Registry can also be used to store special Clients. This Client is capable of being invited to join a JSDT Session.
If the Registry is started by the RegistryFactory.startRegistry method, then it runs in its own thread. This is not a deamon thread, so it should either be stopped with the stopRegistry method, or it will be terminated when the application that started it, exits.
The Registry needs to be started on a "well-known" port. This is
defined by the com.sun.media.jsdt.impl.JSDTObject.registryPort
variable, which by default, is 4561, irrespective of the implementation type.
Naming
,
SessionFactory
,
ClientFactory
, Serialized FormFields inherited from class com.sun.media.jsdt.impl.JSDTObject |
giveTime,
httpTunnelPort,
maxQueueSize,
maxThreadPoolSize,
pingPeriod,
registryAddress,
registryPort,
registryTime,
showMessage,
showStack,
socketFactoryClass,
SSLCipher,
timeoutPeriod,
TTL,
versionString |
Constructor Summary | |
RegistryFactory()
|
Method Summary | |
static boolean |
registryExists(java.lang.String registryType)
|
static boolean |
registryExists(java.lang.String registryType,
int port)
|
static void |
startRegistry(java.lang.String registryType)
startRegistry is a class method that will start a Registry of the appropriate type, using the current setting of the com.sun.media.jsdt.impl.JSDTObject.registryPort variable
as the port number to run it on. |
static void |
startRegistry(java.lang.String registryType,
int port)
startRegistry is a class method that will start a Registry of the appropriate type. |
static void |
stopRegistry(java.lang.String registryType)
stopRegistry is a class method that will stop a Registry of the appropriate type, using the current setting of the com.sun.media.jsdt.impl.JSDTObject.registryPort variable
to determine the port number it is running on. |
static void |
stopRegistry(java.lang.String registryType,
int port)
stopRegistry is a class method that will stop a Registry of the appropriate type. |
Methods inherited from class com.sun.media.jsdt.impl.JSDTObject |
error,
getConnectionType,
setConnectionType |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public RegistryFactory()
Method Detail |
public static void startRegistry(java.lang.String registryType) throws RegistryExistsException, NoRegistryException
com.sun.media.jsdt.impl.JSDTObject.registryPort
variable
as the port number to run it on.
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.
registryType
- the type of Registry to start.public static void startRegistry(java.lang.String registryType, int port) throws RegistryExistsException, NoRegistryException
The variable com.sun.media.jsdt.impl.JSDTObject.registryPort
will be set to the given port number.
registryType
- the type of Registry to start.port
- the port number that the Registry should run on.public static void stopRegistry(java.lang.String registryType) throws NoRegistryException
com.sun.media.jsdt.impl.JSDTObject.registryPort
variable
to determine the port number it is running on.
If the registry was started in this VM with the startRegistry method, then it will just stop the Registry thread, else it will send a message to the running Registry, which will cause the Registry to terminate.
registryType
- the type of Registry to start, (ie. "socket").public static void stopRegistry(java.lang.String registryType, int port) throws NoRegistryException
com.sun.media.jsdt.impl.JSDTObject.registryPort
will be
set to the given port number.
If the registry was started in this VM with the startRegistry method, then it will just stop the Registry thread, else it will send a message to the running Registry, which will cause the Registry to terminate.
registryType
- the type of Registry to start, (ie. "socket").port
- the port number that the Registry is running on.public static boolean registryExists(java.lang.String registryType) throws NoRegistryException
com.sun.media.jsdt.impl.JSDTObject.registryPort
variable to determine the port number it is running on.registryType
- the type of Registry to check on.public static boolean registryExists(java.lang.String registryType, int port) throws NoRegistryException
The variable com.sun.media.jsdt.impl.JSDTObject.registryPort
will be set to the given port number.
registryType
- the type of Registry to check on.port
- the port number that the Registry is running on.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |