PublisherServer
Class PublisherServlet.PageBoxURLHandler

java.lang.Object
  |
  +--PublisherServer.PublisherServlet.PageBoxURLHandler

class PublisherServlet.PageBoxURLHandler
extends java.lang.Object


Field Summary
(package private)  java.util.HashMap PageBoxes
          Key: PageBox URL.
(package private)  java.lang.String PageBoxURLs
          PageBoxes serialized file.
 
Constructor Summary
(package private) PublisherServlet.PageBoxURLHandler(java.lang.String PageBoxURLs)
          Constructor.
 
Method Summary
(package private)  void conditionnalPublish(java.lang.String archive)
          Invoked by doGet in publication handling.
(package private)  boolean deploy(java.lang.String deployUrl, java.lang.String archive)
          Archive deployment using ServletUpdate.
(package private)  void publish(java.lang.String archive)
          Invoked by doPost in publication handling.
(package private)  void save()
          Persist PageBoxes.
(package private)  void subscribe(java.lang.String deployUrl)
          Subscription handling.
(package private)  void synchronize()
          Invoked by Scanner.
(package private)  boolean undeploy(java.lang.String deployUrl, java.lang.String archive)
          Archive undeployment using ServletUpdate.
(package private)  void unpublish(java.lang.String archive)
          Invoked by handleDelete.
(package private)  void unsubscribe(java.lang.String deployUrl)
          Unsubscription handling.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

PageBoxes

java.util.HashMap PageBoxes
Key: PageBox URL. Value: PageBoxEntry.

PageBoxURLs

java.lang.String PageBoxURLs
PageBoxes serialized file.
Constructor Detail

PublisherServlet.PageBoxURLHandler

PublisherServlet.PageBoxURLHandler(java.lang.String PageBoxURLs)
Constructor. No need for synchronization - protected br PublisherServlet.initialize.
Parameters:
PageBoxURLs - PageBoxes serialized file.
Method Detail

save

void save()
Persist PageBoxes. No need for synch. Protected by invoking method.

deploy

boolean deploy(java.lang.String deployUrl,
               java.lang.String archive)
Archive deployment using ServletUpdate.
Parameters:
deployUrl - where to deploy the archive.
archive - archive to deploy.

undeploy

boolean undeploy(java.lang.String deployUrl,
                 java.lang.String archive)
Archive undeployment using ServletUpdate.
Parameters:
deployUrl - where to undeploy the archive.
archive - archive to undeploy. The last part of deployUrl is the contextPath. The del I used don't return any message I could check. I assume if there is no exception the delete has been properly performed.
deployUrl - where to undeploy the archive.
archive - archive to undeploy.

publish

void publish(java.lang.String archive)
Invoked by doPost in publication handling.
Parameters:
archive - archive to publish.

conditionnalPublish

void conditionnalPublish(java.lang.String archive)
Invoked by doGet in publication handling. Implemented to address the case where all PageBoxes are unsubscribed. In that case, archives are not unpublished but remain in the download location. So doGet returns "already published" when you subscribed new pageboxes and try publishing again. To cleanup, use PublisherClient/delete. For optimization, conditionnalPublish allows deploying if not deployed.
Parameters:
archive - archive to publish.

unpublish

void unpublish(java.lang.String archive)
Invoked by handleDelete.
Parameters:
archive - archive to publish.

synchronize

void synchronize()
Invoked by Scanner. Tries to synchronize PageBoxes with PageBoxes HashMap state.

subscribe

void subscribe(java.lang.String deployUrl)
Subscription handling.
Parameters:
deployUrl - PageBox to subscribe.

unsubscribe

void unsubscribe(java.lang.String deployUrl)
Unsubscription handling.
Parameters:
deployUrl - PageBox to unsubscribe.