public final class ServiceRegistry
extends Object
isPrivate()
method may be
used by the servers to detect that situation.Modifier and Type | Method and Description |
---|---|
static ServiceRegistry |
getInstance()
Gets the singleton instance.
|
static Optional<InetAddress> |
getRegistryAddress()
Gets the registry address.
|
static int |
getRegistryPort()
Gets the registry port.
|
Registry |
getRMIRegistry()
Gets the RMI registry.
|
static boolean |
isLocal()
Asks if the registry is local (located in the current JVM).
|
static boolean |
isPrivate()
Asks if the registry is private.
|
static boolean |
isProtected()
Asks if the registry is protected.
|
boolean |
isRegistered(String name)
Asks if a name is registered.
|
static boolean |
isShared()
Asks if the registry is shared.
|
static boolean |
isStealth()
Asks if the registry is stealth.
|
static void |
purge()
Purges the registry entries.
|
boolean |
register(SessionFactory sessionFactory,
String name,
Logger logger)
Registers.
|
String |
registerServer(SessionFactory server,
URI serverURI,
Logger logger)
Registers a RMI server.
|
static boolean |
setUp(KeyedGroups configProperties)
Sets up the singleton instance.
|
void |
unregister(String name,
Logger logger)
Unregisters.
|
@Nonnull @CheckReturnValue public static ServiceRegistry getInstance()
@Nonnull @CheckReturnValue public static Optional<InetAddress> getRegistryAddress()
@CheckReturnValue public static int getRegistryPort()
@CheckReturnValue public static boolean isLocal()
@CheckReturnValue public static boolean isPrivate()
@CheckReturnValue public static boolean isProtected()
@CheckReturnValue public static boolean isShared()
@CheckReturnValue public static boolean isStealth()
public static void purge()
@CheckReturnValue public static boolean setUp(@Nonnull KeyedGroups configProperties)
configProperties
- The configuration properties.@Nonnull @CheckReturnValue public Registry getRMIRegistry()
@CheckReturnValue public boolean isRegistered(String name) throws RemoteException
name
- The name.RemoteException
- When communication with the registry fails.@CheckReturnValue public boolean register(@Nonnull SessionFactory sessionFactory, @Nonnull String name, @Nonnull Logger logger)
sessionFactory
- The session factory.name
- The name.logger
- A logger.@Nullable @CheckReturnValue public String registerServer(@Nonnull SessionFactory server, @Nonnull URI serverURI, @Nonnull Logger logger)
server
- The server object.serverURI
- The server URI.logger
- A logger.public void unregister(@Nonnull String name, @Nonnull Logger logger)
name
- The name.logger
- A logger.Copyright © 2003-2019 Serge Brisson. All Rights Reserved.