edu.uci.isr.yancees.server
Class YanceesServer

java.lang.Object
  extended byedu.uci.isr.yancees.server.YanceesServer

public class YanceesServer
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.


Field Summary
static boolean PRINT_DEBUG
           
 
Constructor Summary
protected YanceesServer()
          This constructor, as protected, prevents the direct instantiation of this object, and guarantees the singleton characteristic of this class.
 
Method Summary
protected  void finalize()
           
static YanceesServer getInstance()
          The only way to access the unique instance of Yancees is by using this access method.
 ProtocolFacade getProtocolAPI()
          Get access to the internal protocolAPI
 PublicationFacade getPublisherAPI()
          Get access to the internal publisher API
 SubscriptionFacade getSubscriberAPI()
          Gets access to the internal subscriber API
 void initialize()
          Initializes the system using the default configuration.
 void initialize(java.io.File configFile)
          Initialize the client API using the provided configuration file
static GenericEvent parseEvent(java.io.File eventFile)
          Allows users to easity parse their XML events before sending to the APIs
static GenericMessage parseMessage(java.io.File messageFile)
          Allows users to easity parse their XML messages before sending to the APIs
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PRINT_DEBUG

public static final boolean PRINT_DEBUG
See Also:
Constant Field Values
Constructor Detail

YanceesServer

protected YanceesServer()
This constructor, as protected, prevents the direct instantiation of this object, and guarantees the singleton characteristic of this class. The protected modifyer allows this class to be subclassed, permiting the over- load of the constructor.

Method Detail

getInstance

public static YanceesServer 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.


initialize

public void initialize(java.io.File configFile)
                throws ParsingException
Initialize the client API using the provided configuration file

Parameters:
configFile -
Throws:
ParsingException

finalize

protected void finalize()
                 throws java.lang.Throwable
Throws:
java.lang.Throwable

getProtocolAPI

public ProtocolFacade getProtocolAPI()
Get access to the internal protocolAPI

Returns:

getPublisherAPI

public PublicationFacade getPublisherAPI()
Get access to the internal publisher API

Returns:

getSubscriberAPI

public SubscriptionFacade getSubscriberAPI()
Gets access to the internal subscriber API

Returns:

parseMessage

public static GenericMessage parseMessage(java.io.File messageFile)
                                   throws ParsingException
Allows users to easity parse their XML messages before sending to the APIs

Parameters:
messageFile - is the file to be parsed
Returns:
a Message object with the parsed document or null in case of some error
Throws:
ParsingException - in case the tag is not present in the document

parseEvent

public static GenericEvent parseEvent(java.io.File eventFile)
                               throws ParsingException
Allows users to easity parse their XML events before sending to the APIs

Parameters:
eventFile - is the file to be parsed
Returns:
an Event object with the parsed document or null in case of some error
Throws:
ParsingException - in case the tag is not present in the document