public abstract class ServiceUtil
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static javax.management.MBeanServer |
MBEAN_SERVER |
| Constructor and Description |
|---|
ServiceUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
close(Service svc) |
static java.lang.String |
create(Service svc,
int port) |
static void |
ensureRmiRegistryIsAvailableAt(int port) |
static java.lang.String |
getAddress(Service svc) |
static java.lang.String |
getHostAddr() |
static java.net.URI |
getLocalSvcUri(java.lang.String svcName,
int port) |
static <S extends Service> |
resolve(java.lang.String addr,
int port,
java.lang.String name) |
static <S extends Service> |
resolve(java.lang.String addr,
java.lang.String name) |
static void |
shutdown() |
public static void ensureRmiRegistryIsAvailableAt(int port)
throws java.rmi.RemoteException
java.rmi.RemoteExceptionpublic static java.net.URI getLocalSvcUri(java.lang.String svcName,
int port)
throws java.net.URISyntaxException
java.net.URISyntaxExceptionpublic static java.lang.String getHostAddr()
public static java.lang.String create(Service svc, int port)
public static <S extends Service> S resolve(java.lang.String addr, java.lang.String name) throws java.rmi.NotBoundException, java.io.IOException, java.net.URISyntaxException
java.rmi.NotBoundExceptionjava.io.IOExceptionjava.net.URISyntaxExceptionpublic static <S extends Service> S resolve(java.lang.String addr, int port, java.lang.String name) throws java.rmi.NotBoundException, java.io.IOException, java.net.URISyntaxException
java.rmi.NotBoundExceptionjava.io.IOExceptionjava.net.URISyntaxExceptionpublic static java.lang.String close(Service svc) throws java.rmi.RemoteException, java.net.MalformedURLException
java.rmi.RemoteExceptionjava.net.MalformedURLExceptionpublic static void shutdown()
public static java.lang.String getAddress(Service svc) throws java.rmi.RemoteException
java.rmi.RemoteException