dk.netarkivet.common.distribute
Class HTTPSRemoteFileRegistry

java.lang.Object
  extended by dk.netarkivet.common.distribute.HTTPRemoteFileRegistry
      extended by 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
 
Constructor Summary
HTTPSRemoteFileRegistry()
           
 
Method Summary
static HTTPRemoteFileRegistry getInstance()
          Get the unique instance.
protected  java.lang.String getProtocol()
          Get the protocol used for this registry, that is 'https'.
protected  java.net.URLConnection openConnection(java.net.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, getCleanupUrl, registerFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPSRemoteFileRegistry

public HTTPSRemoteFileRegistry()
Method Detail

getInstance

public static HTTPRemoteFileRegistry getInstance()
Get the unique instance.

Returns:
The unique instance.

getProtocol

protected java.lang.String getProtocol()
Get the protocol used for this registry, that is 'https'.

Overrides:
getProtocol in class HTTPRemoteFileRegistry
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 class HTTPRemoteFileRegistry

openConnection

protected java.net.URLConnection openConnection(java.net.URL url)
                                         throws java.io.IOException
Open a connection to an URL in this registry. Thus opens SSL connections using the certificate above.

Overrides:
openConnection in class HTTPRemoteFileRegistry
Parameters:
url - The URL to open connection to.
Returns:
an open connection to the given url
Throws:
java.io.IOException - If unable to open connection to the URL
IOFailure - If the connection is not a secure connection