com.sun.jini.tool
Class ComputeHttpmdCodebase

java.lang.Object
  extended by com.sun.jini.tool.ComputeHttpmdCodebase

public class ComputeHttpmdCodebase
extends Object

Computes the message digests for a codebase with HTTPMD URLs. This utility is run from the command line.

A description of HTTPMD URLs can be found in the net.jini.url.httpmd package and its Handler class.

An example command line (shown with lines wrapped for readability) is:

 java -jar install_dir/lib/computehttpmdcodebase.jar \
      install_dir/lib-dl \
      "httpmd://your_host:http_port/sdm-dl.jar;md5=0"
 
where install_dir is the directory where the Apache River release is installed, your_host is the host where the HTTP server for the sdm-dl.jar JAR file will be running, and http_port is the port for that server. This command prints out the download codebase for use by a client that uses the ServiceDiscoveryManager, using an HTTPMD URL to guarantee integrity for the classes in the sdm-dl.jar JAR file. The message digest will be computed using the md5 algorithm, and the 0 will be replaced by the computed digest.

Since:
2.0
Author:
Sun Microsystems, Inc.

Method Summary
static void main(String[] args)
          Computes the message digests for a codebase made up of HTTPMD URLs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

main

public static void main(String[] args)
Computes the message digests for a codebase made up of HTTPMD URLs. The command line arguments are:
 source-directory url...
 
The first argument is the filename or URL of the directory containing the source files for the HTTPMD URLs. The remaining arguments specify the HTTPMD URLs that make up the codebase. The digest values specified in the HTTPMD URLs will be ignored (zeroes are typically used). The path portion of each HTTPMD URL, without the message digest parameters, names a source file relative to the source directory; the message digest for that source file is computed and replaces the digest value in the HTTPMD URL. The resulting HTTPMD URLs are printed, separated by spaces.

Do not use a directory on a remote filesystem, or a directory URL, if the underlying network access protocol does not provide adequate data integrity or authentication of the remote host.



Copyright 2007, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.