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.String
EDAL_PATH_SEPARATOR
-
Constructor Summary
Constructors Modifier Constructor Description protected
EdalHttpServer(EdalConfiguration configuration)
-
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 anURL
to a ticket for the given method.static java.net.URL
generateReviewerURL(java.net.URL entityURL, int reviewersCode)
Generate anURL
to access aPrimaryDataEntity
as reviewer over a temporal landing page.org.eclipse.jetty.server.handler.HandlerCollection
getHandlers()
static java.net.URL
getHttpDownloadURL()
Get theURL
for the HTTP downloads.static java.net.URL
getServerURL()
Get theURL
of the HTTP server.protected void
start()
Start the eDALServer
.protected void
stop()
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 EdalException
Get theURL
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 theURL
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 anURL
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 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 EdalException
Generate anURL
to access aPrimaryDataEntity
as reviewer over a temporal landing page.- Parameters:
entityURL
- the normalURL
to thisPrimaryDataEntity
.reviewersCode
- the code to identify the reviewer- Returns:
- the
URL
to access the landing page for the reviewer. - Throws:
EdalException
- if unable to generate reviewerURL
-
getHandlers
public org.eclipse.jetty.server.handler.HandlerCollection getHandlers()
-
-