Class ServiceUtil


  • public abstract class ServiceUtil
    extends java.lang.Object
    Created on 28.09.16.
    • Constructor Detail

      • ServiceUtil

        public ServiceUtil()
    • 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.URISyntaxException
        java.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.URISyntaxException
        java.net.MalformedURLException
        java.net.SocketException
        java.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.NotBoundException
        java.rmi.RemoteException
        java.net.URISyntaxException
        java.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.NotBoundException
        java.io.IOException
        java.net.URISyntaxException
      • close

        public static java.lang.String close​(Service svc)
                                      throws java.rmi.RemoteException,
                                             java.net.MalformedURLException
        Throws:
        java.rmi.RemoteException
        java.net.MalformedURLException
      • shutdown

        public static void shutdown()