Package com.emc.mongoose.base.svc
Class ServiceUtil
- java.lang.Object
-
- com.emc.mongoose.base.svc.ServiceUtil
-
public abstract class ServiceUtil extends java.lang.ObjectCreated on 28.09.16.
-
-
Constructor Summary
Constructors Constructor Description ServiceUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Stringclose(Service svc)static java.lang.Stringcreate(Service svc, int port)static voidensureRmiRegistryIsAvailableAt(int port)static java.lang.StringgetAnyExternalHostAddress()static java.net.URIgetLocalSvcUri(java.lang.String svcName, int port)static booleanisLocalAddress(java.lang.String addrWithPort)static <S extends Service>
Sresolve(java.lang.String addr, int port, java.lang.String name)static <S extends Service>
Sresolve(java.lang.String addr, java.lang.String name)static voidshutdown()
-
-
-
Method Detail
-
ensureRmiRegistryIsAvailableAt
public static void ensureRmiRegistryIsAvailableAt(int port) throws java.rmi.RemoteException- Throws:
java.rmi.RemoteException
-
getLocalSvcUri
public static java.net.URI getLocalSvcUri(java.lang.String svcName, int port) throws java.net.URISyntaxException, java.net.SocketException- Throws:
java.net.URISyntaxExceptionjava.net.SocketException
-
getAnyExternalHostAddress
public static java.lang.String getAnyExternalHostAddress() throws java.net.SocketException- Throws:
java.net.SocketException
-
isLocalAddress
public static boolean isLocalAddress(java.lang.String addrWithPort)
-
create
public static java.lang.String create(Service svc, int port) throws java.net.URISyntaxException, java.net.MalformedURLException, java.net.SocketException, java.rmi.RemoteException
- Throws:
java.net.URISyntaxExceptionjava.net.MalformedURLExceptionjava.net.SocketExceptionjava.rmi.RemoteException
-
resolve
public static <S extends Service> S resolve(java.lang.String addr, java.lang.String name) throws java.rmi.NotBoundException, java.rmi.RemoteException, java.net.URISyntaxException, java.net.MalformedURLException
- Throws:
java.rmi.NotBoundExceptionjava.rmi.RemoteExceptionjava.net.URISyntaxExceptionjava.net.MalformedURLException
-
resolve
public 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
- Throws:
java.rmi.NotBoundExceptionjava.io.IOExceptionjava.net.URISyntaxException
-
close
public static java.lang.String close(Service svc) throws java.rmi.RemoteException, java.net.MalformedURLException
- Throws:
java.rmi.RemoteExceptionjava.net.MalformedURLException
-
shutdown
public static void shutdown()
-
-