PageBoxLib
Class Relayer.RelayerThread

java.lang.Object
  extended byjava.lang.Thread
      extended byPageBoxLib.Relayer.RelayerThread
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
Relayer

class Relayer.RelayerThread
extends java.lang.Thread

Thread class deploying archives for the repository.


Field Summary
(package private)  Deployer deployer
          Deploy Web service invoker
(package private)  java.lang.String downloadURL
          Repository URL
private  java.lang.String password
          Subscriber password
(package private)  Querier querier
          Deploy Web service invoker
(package private)  java.util.LinkedList queue
          Queue used to pass Relay requests.
(package private)  boolean started
          True when Relay thread started
private  java.lang.String user
          Subscriber user name
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
(package private) Relayer.RelayerThread(java.lang.String downloadURL, java.lang.String user, java.lang.String password, java.lang.String deployerClass, java.lang.String querierClass)
          Constructor.
 
Method Summary
private  DeployIF.Status add(Relayer.Entry e, java.lang.String url, java.lang.String user, java.lang.String pbUser, java.lang.String pbPasswd, DeployIF.UrlUser[] relayed)
          Deploys an archive.
private  void relay(Relayer.Entry e, DeployIF.UrlUser[] relayed, java.util.ArrayList usa)
          Recursive deployment - send half the deployments to the target PageBox.
private  boolean repNotify(java.lang.String arch, RepoQueryIF.UrlStatus[] usal)
          Notify the success of relayed deployments to the repository.
 void run()
          Main method of the RelayerThread thread.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

started

boolean started
True when Relay thread started


queue

java.util.LinkedList queue
Queue used to pass Relay requests. Elements: Entry objects.


downloadURL

java.lang.String downloadURL
Repository URL


user

private java.lang.String user
Subscriber user name


password

private java.lang.String password
Subscriber password


deployer

Deployer deployer
Deploy Web service invoker


querier

Querier querier
Deploy Web service invoker

Constructor Detail

Relayer.RelayerThread

Relayer.RelayerThread(java.lang.String downloadURL,
                      java.lang.String user,
                      java.lang.String password,
                      java.lang.String deployerClass,
                      java.lang.String querierClass)
Constructor.

Parameters:
downloadURL - Repository URL
user - subscriber user name
password - subscriber password
Method Detail

run

public void run()
Main method of the RelayerThread thread.


relay

private void relay(Relayer.Entry e,
                   DeployIF.UrlUser[] relayed,
                   java.util.ArrayList usa)
Recursive deployment - send half the deployments to the target PageBox. Called in the RelayThread thread.

Parameters:
e - Entry object describing the Relay query
relayed - list of subscribers to deploy

repNotify

private boolean repNotify(java.lang.String arch,
                          RepoQueryIF.UrlStatus[] usal)
Notify the success of relayed deployments to the repository. Called in the RelayThread thread.

Parameters:
arch - archive name
usal - array of subscriber UrlStatus
Returns:
true in case of success

add

private DeployIF.Status add(Relayer.Entry e,
                            java.lang.String url,
                            java.lang.String user,
                            java.lang.String pbUser,
                            java.lang.String pbPasswd,
                            DeployIF.UrlUser[] relayed)
Deploys an archive. Called in the RelayThread thread.

Parameters:
e - Entry object
url - Web service URI
user - user who subscribed the PageBox
pbUser - PageBox user
pbPasswd - PageBox password
relayed - PageBox instances to deploy
Returns:
null or Status object