edu.uci.isr.yancees
Class YanceesFacade

java.lang.Object
  extended by edu.uci.isr.yancees.YanceesFacade

public class YanceesFacade
extends java.lang.Object

This class centralized all aspects of yancees: 1) The unique connection to the dispatcher (siena, elvin or other) 2) The access to the specific Facades (publication, subscription, administration), configuring them as necessary 3) The parsing of files in Notification, Subscription and Message wrappers Local users should use this class as the front-end to Yancees notification server Remote users should use the RemoteYanceesInterface. This last interface is most likely to be the preferred one.


Constructor Summary
protected YanceesFacade()
          This constructor, as protected, prevents the direct instantiation of this object, and guarantees the singleton characteristic of this class.
 
Method Summary
 void bootstrap(java.io.File configFile)
          Initialize the client API using the provided configuration file.
protected  void finalize()
          Automatically called when the object is destroyed, this method disposes all the resources allocated by the server, closing all the connections to the dispatcher in use, saving all data and finalizing all the plug-ins and so on.
static YanceesFacade getInstance()
          The only way to access the unique instance of Yancees is by using this access method.
 java.lang.String getLookupName()
           
 ProtocolFacade getProtocolAPI()
          Get access to the internal protocolAPI and initializes this component if necessary
 PublicationFacade getPublisherAPI()
          Get access to the internal publisher API and initializes this component if necessary
 SubscriptionFacade getSubscriberAPI()
          Gets access to the internal subscriber API and initializes this component if necessary
 void initialize()
          Initializes the system using the default configuration.
 void setLookupName(java.lang.String lookupName)
          Parsers a XML document from a file into a XML DOM Document object.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

YanceesFacade

protected YanceesFacade()
This constructor, as protected, prevents the direct instantiation of this object, and guarantees the singleton characteristic of this class. The protected modifier allows this class to be sub-classed, permitting the over- load of the constructor.

Method Detail

getInstance

public static YanceesFacade getInstance()
The only way to access the unique instance of Yancees is by using this access method.

Returns:
the instance of Yancess using the default configuration.

initialize

public void initialize()
Initializes the system using the default configuration. This method should be called before any other methods in this class.


bootstrap

public void bootstrap(java.io.File configFile)
               throws MessageParsingException
Initialize the client API using the provided configuration file. This method should be called before any other methods in this class.

Parameters:
configFile - is a file having the configuration for all the components of the system.
Throws:
MessageParsingException

finalize

protected void finalize()
                 throws java.lang.Throwable
Automatically called when the object is destroyed, this method disposes all the resources allocated by the server, closing all the connections to the dispatcher in use, saving all data and finalizing all the plug-ins and so on.

Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable

getProtocolAPI

public ProtocolFacade getProtocolAPI()
Get access to the internal protocolAPI and initializes this component if necessary

Returns:
the ServerPrococolFacade unique instance

getPublisherAPI

public PublicationFacade getPublisherAPI()
Get access to the internal publisher API and initializes this component if necessary

Returns:
the ServerPublicationFacade unique instance

getSubscriberAPI

public SubscriptionFacade getSubscriberAPI()
Gets access to the internal subscriber API and initializes this component if necessary

Returns:
the ServerSubscriptionFacade unique instance

setLookupName

public void setLookupName(java.lang.String lookupName)
Parsers a XML document from a file into a XML DOM Document object. This parser performs syntactic checking according to the XMLSechema types defined in the document. In other words, it is a validating and name-aware parser

Parameters:
documentFile - is the file which will be parsed into a Document object

getLookupName

public java.lang.String getLookupName()