Repository
Class Retry

java.lang.Object
  extended byRepository.Retry

class Retry
extends java.lang.Object

deploy and undeploy retry.

Changes:

alexis.grandemange@pagebox.net

Copyright (c) 2002-2004 Alexis Grandemange

This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public License
 as published by the Free Software Foundation; version 2.1 of the
 License.
 This library is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 GNU Lesser General Public License for more details.
 A copy of the GNU Lesser General Public License lesser.txt should be
 included in the distribution.

Version:
0, 1, 1
Author:
Alexis Grandemange

Nested Class Summary
(package private)  class Retry.RetryThread
          Thread class retrying deployments and undeployments.
 
Field Summary
(package private)  int ceiling
          Above this value distribution with relay
(package private)  DynDns dd
          Used to register/update a DNS address with DynDNS protocol
(package private)  java.lang.String deltaDir
          Directory where delta are stored
(package private)  Deployer deployer
          Web service invocation object
(package private)  java.lang.String deployerClass
          Name of the class responsible for calling the DeployIF web service
(package private)  java.lang.String downloadDir
          Directory where archives are stored
(package private)  java.lang.String downloadURL
          URL of the RepoQuery web service of this Repository
(package private)  ListenerIF listener
          Non-HTTP listener instance
(package private)  Log log
          Logging object
(package private)  long period
          Period between two retries = 1/4 hour
(package private)  int relayTime
          Unsafe time between relay deployment and changes
(package private)  Retry.RetryThread rt
          Thread handle
(package private)  java.lang.String workDir
          Directory where archives.xml is defined
(package private)  java.lang.String ws
          Web service URL
 
Constructor Summary
(package private) Retry()
           
 
Method Summary
private  java.lang.String adjustDownloadURL(java.lang.String downloadURL)
          Updates the URL with dyndns data (method getHost).
(package private)  void computeURL(HttpServletRequest request)
          Computes the URL of the RepoQuery Web service.
(package private)  void end()
          Requires the thread termination
(package private)  void init(ServletContext ctx)
          Initialization method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

workDir

java.lang.String workDir
Directory where archives.xml is defined


downloadDir

java.lang.String downloadDir
Directory where archives are stored


deltaDir

java.lang.String deltaDir
Directory where delta are stored


ceiling

int ceiling
Above this value distribution with relay


relayTime

int relayTime
Unsafe time between relay deployment and changes


deployerClass

java.lang.String deployerClass
Name of the class responsible for calling the DeployIF web service


log

Log log
Logging object


period

long period
Period between two retries = 1/4 hour


dd

DynDns dd
Used to register/update a DNS address with DynDNS protocol


listener

ListenerIF listener
Non-HTTP listener instance


ws

java.lang.String ws
Web service URL


downloadURL

java.lang.String downloadURL
URL of the RepoQuery web service of this Repository


deployer

Deployer deployer
Web service invocation object


rt

Retry.RetryThread rt
Thread handle

Constructor Detail

Retry

Retry()
Method Detail

init

void init(ServletContext ctx)
Initialization method. Creates the Retry thread.

Parameters:
ctx - used to retrieve DynDNS parameters and period

end

void end()
Requires the thread termination


computeURL

void computeURL(HttpServletRequest request)
Computes the URL of the RepoQuery Web service.

Parameters:
request - HTTP request

adjustDownloadURL

private java.lang.String adjustDownloadURL(java.lang.String downloadURL)
Updates the URL with dyndns data (method getHost).

Parameters:
downloadURL - URL computed after request.getServerName in servlets
Returns:
download URL updated with data from DynDns.getHost