Package dk.netarkivet.common.distribute
Class HTTPSRemoteFileRegistry
- java.lang.Object
-
- dk.netarkivet.common.distribute.HTTPRemoteFileRegistry
-
- dk.netarkivet.common.distribute.HTTPSRemoteFileRegistry
-
- All Implemented Interfaces:
CleanupIF
public class HTTPSRemoteFileRegistry extends HTTPRemoteFileRegistry
This is a registry for HTTPS remote file, meant for serving registered files to remote hosts. It will use secure communication using a shared certificate. The embedded webserver handling remote files for HTTPSRemoteFile point-to-point communication. Optimised to use direct transfer on local machine.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class dk.netarkivet.common.distribute.HTTPRemoteFileRegistry
HTTPRemoteFileRegistry.HTTPRemoteFileRegistryHandler
-
-
Field Summary
-
Fields inherited from class dk.netarkivet.common.distribute.HTTPRemoteFileRegistry
instance, port, server
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HTTPRemoteFileRegistry
getInstance()
Get the unique instance.protected String
getProtocol()
Get the protocol used for this registry, that is 'https'.protected URLConnection
openConnection(URL url)
Open a connection to an URL in this registry.protected void
startServer()
Start the server, including a handler that responds with registered files, removes registered files on request, and gives 404 otherwise.-
Methods inherited from class dk.netarkivet.common.distribute.HTTPRemoteFileRegistry
cleanup, registerFile
-
-
-
-
Method Detail
-
getInstance
public static HTTPRemoteFileRegistry getInstance()
Get the unique instance.- Returns:
- The unique instance.
-
getProtocol
protected String getProtocol()
Get the protocol used for this registry, that is 'https'.- Overrides:
getProtocol
in classHTTPRemoteFileRegistry
- Returns:
- "https", the protocol.
-
startServer
protected void startServer()
Start the server, including a handler that responds with registered files, removes registered files on request, and gives 404 otherwise. Connection to this web host only possible with the shared certificate.- Overrides:
startServer
in classHTTPRemoteFileRegistry
-
openConnection
protected URLConnection openConnection(URL url) throws IOException
Open a connection to an URL in this registry. Thus opens SSL connections using the certificate above.- Overrides:
openConnection
in classHTTPRemoteFileRegistry
- Parameters:
url
- The URL to open connection to.- Returns:
- an open connection to the given url
- Throws:
IOException
- If unable to open connection to the URLIOFailure
- If the connection is not a secure connection
-
-