wt.intersvrcom
Class StandardInterSvrComService

java.lang.Object
  extended bywt.services.StandardManager
      extended bywt.intersvrcom.StandardInterSvrComService
All Implemented Interfaces:
InterSvrComService, Manager, NetFactor, Serializable

public class StandardInterSvrComService
extends StandardManager
implements InterSvrComService, Serializable

Use the newStandardInterSvrComService static factory method(s), not the StandardInterSvrComService constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: true

Extendable: false

See Also:
Serialized Form

Nested Class Summary
(package private)  class StandardInterSvrComService.InterSvrComServiceEventListener
           
static class StandardInterSvrComService.SiteInfoCache
           
static class StandardInterSvrComService.SiteSecurityListener
           
 
Field Summary
private static String CLASSNAME
           
private  Object lock
           
static String MASTER_SERVER_URL
           
static String MASTER_SITE_NAME
           
static String MASTER_URL
           
private static String RESOURCE
           
private  boolean servDone
           
(package private) static String SIGNATURE_ALGORITHM
           
private static StandardInterSvrComService.SiteInfoCache siteInfoCache
           
static boolean ULTRA_LIGHT
           
private static boolean VERBOSE
           
 
Fields inherited from class wt.services.StandardManager
 
Fields inherited from interface wt.services.Manager
MANAGER_SERVICE, STARTUP_AUTOMATIC, STARTUP_MANUAL, STATUS_EMERGENCY_SHUTDOWN, STATUS_EMERGENCY_SHUTTING_DOWN, STATUS_SHUTDOWN, STATUS_SHUTDOWN_ERRORS, STATUS_SHUTDOWN_FAILURE, STATUS_SHUTTING_DOWN, STATUS_STARTED, STATUS_STARTED_ERRORS, STATUS_STARTING_UP, STATUS_STARTUP_FAILURE
 
Constructor Summary
StandardInterSvrComService()
           
 
Method Summary
private  void checkForDuplicateSiteOrURL(Site newSite, String evt)
           
private  void checkForMasterDelete(Site s)
           
static boolean compressContentFor(String url)
           
private  Site erazeSecurityInfo(Site site)
           
 byte[] exportKey(Site site)
          Retrieves site's public security key.
 Site generateKeyPair(Site site)
          Generates security keys for the site.
 Enumeration getAllSites()
          Retrieves all the sites in the system.
 String getConceptualClassname()
          Deprecated.  
 Timestamp getLastUpdated(Site site)
          

Supported API: false
 Site getLocalSite()
          Retrieves master site.
 Repository getRepository(Site site)
          

Supported API: false
 Site getSite(String url)
          Retrieves the site object with the supplied URL.
 Site getSiteByGuid(String guid)
          

Supported API: false
 Site getSiteByUfid(Ufid ufid)
          

Supported API: false
static StandardInterSvrComService.SiteInfoCache getSiteInfoCache()
           
 SiteSecurity getSiteSecurity(ObjectReference oRef)
          

Supported API: false
private  void handleDuplicateMasters()
           
 Site importKey(Site site, byte[] is_bytes)
          Imports another site's public key to this site.
protected  void initialize()
          

Supported API: false
private  void initializeSiteInfo()
           
private  void initSiteSchema()
           
static StandardInterSvrComService newStandardInterSvrComService()
          Default factory for the class.
protected  void performStartupProcess()
          

Supported API: false
 void registerUfidRepository(Site site, Repository repository)
          

Supported API: false
private  boolean testEquivalentUrlIgnoringHostNameCase(String url1, String url2)
          Return true if the 2 URLs (url1, url2) are equivalent.
 void unregisterUfidRepository(Site site)
          

Supported API: false
 void updateSiteSecurity(SiteSecurity ss)
          

Supported API: false
private  SiteSecurity validateCreateSecurity(SiteSecurity siteSecurity)
           
static void validateSecurity(Site site, SiteSecurity siteSecurity)
           
 
Methods inherited from class wt.services.StandardManager
emergencyShutdown, emergencyShutdownComplete, emergencyShuttingDown, getClassInfo, getManagerService, getManagerStatus, getName, getStartupType, init, initialize, isStarted, newStandardManager, newStandardManager, performEmergencyShutdownProcess, performShutdownProcess, registerEvents, setManagerService, shutdown, shutdownFailure, shutdownSuccess, shuttingDown, started, startedErrors, startingUp, startup, startupFailure, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

VERBOSE

private static final boolean VERBOSE

ULTRA_LIGHT

public static final boolean ULTRA_LIGHT

MASTER_URL

public static final String MASTER_URL

MASTER_SERVER_URL

public static String MASTER_SERVER_URL

MASTER_SITE_NAME

public static String MASTER_SITE_NAME

siteInfoCache

private static StandardInterSvrComService.SiteInfoCache siteInfoCache

SIGNATURE_ALGORITHM

static final String SIGNATURE_ALGORITHM
See Also:
Constant Field Values

lock

private Object lock

servDone

private boolean servDone
Constructor Detail

StandardInterSvrComService

public StandardInterSvrComService()
Method Detail

getConceptualClassname

public String getConceptualClassname()
Deprecated.  

Returns the conceptual (modeled) name for the class.

Supported API: false

Specified by:
getConceptualClassname in interface NetFactor
Overrides:
getConceptualClassname in class StandardManager
Returns:
String

performStartupProcess

protected void performStartupProcess()
                              throws ManagerException


Supported API: false

Overrides:
performStartupProcess in class StandardManager
Throws:
ManagerException

initialize

protected void initialize()
                   throws WTException


Supported API: false

Overrides:
initialize in class StandardManager
Throws:
WTException

newStandardInterSvrComService

public static StandardInterSvrComService newStandardInterSvrComService()
                                                                throws WTException
Default factory for the class.

Supported API: false

Returns:
StandardInterSvrComService
Throws:
WTException

generateKeyPair

public Site generateKeyPair(Site site)
                     throws WTException
Generates security keys for the site.

Supported API: true

Specified by:
generateKeyPair in interface InterSvrComService
Parameters:
site -
Returns:
Site
Throws:
WTException

exportKey

public byte[] exportKey(Site site)
                 throws WTException
Retrieves site's public security key.

Supported API: true

Specified by:
exportKey in interface InterSvrComService
Parameters:
site -
Returns:
byte[]
Throws:
WTException

importKey

public Site importKey(Site site,
                      byte[] is_bytes)
               throws WTException
Imports another site's public key to this site.

Supported API: true

Specified by:
importKey in interface InterSvrComService
Parameters:
site -
is_bytes -
Returns:
Site
Throws:
WTException

getLastUpdated

public Timestamp getLastUpdated(Site site)
                         throws WTException


Supported API: false

Specified by:
getLastUpdated in interface InterSvrComService
Parameters:
site -
Returns:
Timestamp
Throws:
WTException

getLocalSite

public Site getLocalSite()
                  throws WTException
Retrieves master site.

Supported API: true

Specified by:
getLocalSite in interface InterSvrComService
Returns:
Site
Throws:
WTException

getAllSites

public Enumeration getAllSites()
                        throws WTException
Retrieves all the sites in the system.

Supported API: true

Specified by:
getAllSites in interface InterSvrComService
Returns:
Enumeration
Throws:
WTException

getSite

public Site getSite(String url)
             throws WTException
Retrieves the site object with the supplied URL.

Supported API: true

Specified by:
getSite in interface InterSvrComService
Parameters:
url -
Returns:
Site
Throws:
WTException

getSiteByGuid

public Site getSiteByGuid(String guid)
                   throws WTException


Supported API: false

Specified by:
getSiteByGuid in interface InterSvrComService
Parameters:
guid -
Returns:
Site
Throws:
WTException

getSiteByUfid

public Site getSiteByUfid(Ufid ufid)
                   throws WTException


Supported API: false

Specified by:
getSiteByUfid in interface InterSvrComService
Parameters:
ufid -
Returns:
Site
Throws:
WTException

registerUfidRepository

public void registerUfidRepository(Site site,
                                   Repository repository)
                            throws WTException


Supported API: false

Specified by:
registerUfidRepository in interface InterSvrComService
Parameters:
site -
repository -
Throws:
WTException

unregisterUfidRepository

public void unregisterUfidRepository(Site site)
                              throws WTException


Supported API: false

Specified by:
unregisterUfidRepository in interface InterSvrComService
Parameters:
site -
Throws:
WTException

getRepository

public Repository getRepository(Site site)
                         throws WTException


Supported API: false

Specified by:
getRepository in interface InterSvrComService
Parameters:
site -
Returns:
Repository
Throws:
WTException

getSiteSecurity

public SiteSecurity getSiteSecurity(ObjectReference oRef)
                             throws WTException


Supported API: false

Specified by:
getSiteSecurity in interface InterSvrComService
Parameters:
oRef -
Returns:
SiteSecurity
Throws:
WTException

updateSiteSecurity

public void updateSiteSecurity(SiteSecurity ss)
                        throws WTException


Supported API: false

Specified by:
updateSiteSecurity in interface InterSvrComService
Parameters:
ss -
Throws:
WTException

validateCreateSecurity

private SiteSecurity validateCreateSecurity(SiteSecurity siteSecurity)
                                     throws WTException
Throws:
WTException

validateSecurity

public static void validateSecurity(Site site,
                                    SiteSecurity siteSecurity)
                             throws WTException
Throws:
WTException

erazeSecurityInfo

private Site erazeSecurityInfo(Site site)
                        throws WTException
Throws:
WTException

checkForDuplicateSiteOrURL

private void checkForDuplicateSiteOrURL(Site newSite,
                                        String evt)
                                 throws WTException
Throws:
WTException

checkForMasterDelete

private void checkForMasterDelete(Site s)
                           throws WTException
Throws:
WTException

initSiteSchema

private void initSiteSchema()
                     throws ManagerException
Throws:
ManagerException

handleDuplicateMasters

private void handleDuplicateMasters()
                             throws ManagerException
Throws:
ManagerException

testEquivalentUrlIgnoringHostNameCase

private boolean testEquivalentUrlIgnoringHostNameCase(String url1,
                                                      String url2)
Return true if the 2 URLs (url1, url2) are equivalent. The algorithm is to ignore the case of the schema (say http) and the host name (say, WWW.mycompany.com).


getSiteInfoCache

public static StandardInterSvrComService.SiteInfoCache getSiteInfoCache()

initializeSiteInfo

private void initializeSiteInfo()
                         throws WTException
Throws:
WTException

compressContentFor

public static boolean compressContentFor(String url)
                                  throws WTException
Throws:
WTException