Class EdalHttpServer


  • public class EdalHttpServer
    extends java.lang.Object
    • Field Detail

      • EDAL_PATH_SEPARATOR

        public static final java.lang.String EDAL_PATH_SEPARATOR
        See Also:
        Constant Field Values
    • Constructor Detail

    • Method Detail

      • checkIfLocalhostIsInDomain

        public static boolean checkIfLocalhostIsInDomain​(java.net.InetAddress localhost,
                                                         java.lang.String domain)
      • checkIfDomainIsAliasForLocalhost

        public static boolean checkIfDomainIsAliasForLocalhost​(java.net.InetAddress localhost,
                                                               java.lang.String domain)
                                                        throws java.net.UnknownHostException
        Throws:
        java.net.UnknownHostException
      • checkIfLocalhostHasSubDomain

        public static boolean checkIfLocalhostHasSubDomain​(java.net.InetAddress localhost,
                                                           java.lang.String domain)
                                                    throws java.net.UnknownHostException
        Throws:
        java.net.UnknownHostException
      • checkIfLocalhostIsInDomain

        public static boolean checkIfLocalhostIsInDomain​(java.lang.String localhost,
                                                         java.lang.String domain)
      • checkIfDomainIsAliasForLocalhost

        public static boolean checkIfDomainIsAliasForLocalhost​(java.lang.String localhost,
                                                               java.lang.String domain)
                                                        throws java.net.UnknownHostException
        Throws:
        java.net.UnknownHostException
      • checkIfLocalhostHasSubDomain

        public static boolean checkIfLocalhostHasSubDomain​(java.lang.String localhost,
                                                           java.lang.String domain)
                                                    throws java.net.UnknownHostException
        Throws:
        java.net.UnknownHostException
      • start

        protected void start()
        Start the eDAL Server.
      • stop

        protected void stop()
        Stop the eDAL Server.
      • getServerURL

        public static java.net.URL getServerURL()
                                         throws EdalException
        Get the URL of the HTTP server.
        Returns:
        the URL of the HTTP server.
        Throws:
        EdalException - if no HTTP server was started.
      • getHttpDownloadURL

        public static java.net.URL getHttpDownloadURL()
                                               throws EdalException
        Get the URL for the HTTP downloads.
        Returns:
        the URL of the HTTP server.
        Throws:
        EdalException - if no HTTP server was started.
      • generateMethodURL

        public static java.net.URL generateMethodURL​(java.lang.String ticket,
                                                     int reviewerCode,
                                                     EdalHttpFunctions method)
                                              throws EdalException
        Generate an URL to a ticket for the given method.
        Parameters:
        ticket - the ticket to the method.
        reviewerCode - the code to identify the reviewer.
        method - the method for this URL.
        Returns:
        the URL to accept the PublicReference .
        Throws:
        EdalException - if unable to generate an URL.
      • generateReviewerURL

        public static java.net.URL generateReviewerURL​(java.net.URL entityURL,
                                                       int reviewersCode)
                                                throws EdalException
        Generate an URL to access a PrimaryDataEntity as reviewer over a temporal landing page.
        Parameters:
        entityURL - the normal URL to this PrimaryDataEntity .
        reviewersCode - the code to identify the reviewer
        Returns:
        the URL to access the landing page for the reviewer.
        Throws:
        EdalException - if unable to generate reviewer URL
      • getHandlers

        public org.eclipse.jetty.server.handler.HandlerCollection getHandlers()