Class EdalHttpServer
- java.lang.Object
-
- de.ipk_gatersleben.bit.bi.edal.primary_data.EdalHttpServer
-
public class EdalHttpServer extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringEDAL_PATH_SEPARATOR
-
Constructor Summary
Constructors Modifier Constructor Description protectedEdalHttpServer(EdalConfiguration configuration)
-
Method Summary
Modifier and Type Method Description static booleancheckIfDomainIsAliasForLocalhost(java.lang.String localhost, java.lang.String domain)static booleancheckIfDomainIsAliasForLocalhost(java.net.InetAddress localhost, java.lang.String domain)static booleancheckIfLocalhostHasSubDomain(java.lang.String localhost, java.lang.String domain)static booleancheckIfLocalhostHasSubDomain(java.net.InetAddress localhost, java.lang.String domain)static booleancheckIfLocalhostIsInDomain(java.lang.String localhost, java.lang.String domain)static booleancheckIfLocalhostIsInDomain(java.net.InetAddress localhost, java.lang.String domain)static java.net.URLgenerateMethodURL(java.lang.String ticket, int reviewerCode, EdalHttpFunctions method)Generate anURLto a ticket for the given method.static java.net.URLgenerateReviewerURL(java.net.URL entityURL, int reviewersCode)Generate anURLto access aPrimaryDataEntityas reviewer over a temporal landing page.org.eclipse.jetty.server.handler.HandlerCollectiongetHandlers()static java.net.URLgetHttpDownloadURL()Get theURLfor the HTTP downloads.static java.net.URLgetServerURL()Get theURLof the HTTP server.protected voidstart()Start the eDALServer.protected voidstop()Stop the eDALServer.
-
-
-
Field Detail
-
EDAL_PATH_SEPARATOR
public static final java.lang.String EDAL_PATH_SEPARATOR
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EdalHttpServer
protected EdalHttpServer(EdalConfiguration configuration)
-
-
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 eDALServer.
-
stop
protected void stop()
Stop the eDALServer.
-
getServerURL
public static java.net.URL getServerURL() throws EdalExceptionGet theURLof the HTTP server.- Returns:
- the
URLof the HTTP server. - Throws:
EdalException- if no HTTP server was started.
-
getHttpDownloadURL
public static java.net.URL getHttpDownloadURL() throws EdalExceptionGet theURLfor the HTTP downloads.- Returns:
- the
URLof 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 EdalExceptionGenerate anURLto a ticket for the given method.- Parameters:
ticket- the ticket to the method.reviewerCode- the code to identify the reviewer.method- the method for thisURL.- 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 EdalExceptionGenerate anURLto access aPrimaryDataEntityas reviewer over a temporal landing page.- Parameters:
entityURL- the normalURLto thisPrimaryDataEntity.reviewersCode- the code to identify the reviewer- Returns:
- the
URLto access the landing page for the reviewer. - Throws:
EdalException- if unable to generate reviewerURL
-
getHandlers
public org.eclipse.jetty.server.handler.HandlerCollection getHandlers()
-
-