Class EdalHttpServer


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

      Fields 
      Modifier and Type Field Description
      static java.lang.String EDAL_PATH_SEPARATOR  
    • Method Summary

      Modifier and Type Method Description
      static boolean checkIfDomainIsAliasForLocalhost​(java.lang.String localhost, java.lang.String domain)  
      static boolean checkIfDomainIsAliasForLocalhost​(java.net.InetAddress localhost, java.lang.String domain)  
      static boolean checkIfLocalhostHasSubDomain​(java.lang.String localhost, java.lang.String domain)  
      static boolean checkIfLocalhostHasSubDomain​(java.net.InetAddress localhost, java.lang.String domain)  
      static boolean checkIfLocalhostIsInDomain​(java.lang.String localhost, java.lang.String domain)  
      static boolean checkIfLocalhostIsInDomain​(java.net.InetAddress localhost, java.lang.String domain)  
      static java.net.URL generateMethodURL​(java.lang.String ticket, int reviewerCode, EdalHttpFunctions method)
      Generate an URL to a ticket for the given method.
      static java.net.URL generateReviewerURL​(java.net.URL entityURL, int reviewersCode)
      Generate an URL to access a PrimaryDataEntity as reviewer over a temporal landing page.
      org.eclipse.jetty.server.handler.HandlerCollection getHandlers()  
      static java.net.URL getHttpDownloadURL()
      Get the URL for the HTTP downloads.
      static java.net.URL getServerURL()
      Get the URL of the HTTP server.
      protected void start()
      Start the eDAL Server.
      protected void stop()
      Stop the eDAL Server.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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()