com.kinesis.server
Class KineticFusionServerFactory

java.lang.Object
  extended bycom.kinesis.server.KineticFusionServerFactory

public final class KineticFusionServerFactory
extends java.lang.Object

Singleton class used to create separate KineticFusionServerType instances and global configuration methods for logging, and handler configuration.


Method Summary
 void addConsoleLogger()
          Add a global console log appender to the logging system
 void addLoggingAppender(LogEventAppender appender)
          Add a global log event appender to the logging system.
 void addLoggingAppender(LoggingAppender appender)
          Add a global logging appender to the logging system.
 ConfigurationManagerType getConfigurationManager()
          Returns the global object for accessing and altering configuration properties for the entire application and for individual threads
static KineticFusionServerFactory getInstance()
          Get the global instance.
 KineticFusionServerType newServer()
          Returns a new KineticFusionServerType for processing RVML and SWF documents
 ServerSaxHandlerType newServerSaxHandler()
          Returns a new ServerSaxHandlerType for processing RVML documents generated by externally generating SAX events
 boolean preload()
          Preload all classes in the Server jar file
 void removeAllLoggingHandlers()
          Remove all user-defined and system logging appenders from the application.
 boolean removeLoggingAppender(LogEventAppender appender)
          Remove a global log event appender from the logging system
 boolean removeLoggingAppender(LoggingAppender appender)
          Remove a global logging appender from the logging system
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static KineticFusionServerFactory getInstance()
                                              throws KineticFusionException
Get the global instance. There should only one KineticFusionServerFactory instance defined. This should be enforced by ensuring thatonly one classloader instance is responsible for loading this class

Returns:
the singleton class instance
Throws:
KineticFusionException - if any initialisation exception occurs. The cause of the exception can be retrieved by calling getCause()

preload

public boolean preload()
Preload all classes in the Server jar file

Returns:
true if preloading was successful, false otherwise

addLoggingAppender

public void addLoggingAppender(LoggingAppender appender)
                        throws KineticFusionException
Add a global logging appender to the logging system. This appender will receive output from all active threads. This method should not be used for Commons Logging as the KineticFusion application cannot create proxy log objects for Commons Logging

Parameters:
appender -
Throws:
KineticFusionException - if any exception occurs. The cause of the exception can be retrieved by calling getCause()

addLoggingAppender

public void addLoggingAppender(LogEventAppender appender)
                        throws KineticFusionException
Add a global log event appender to the logging system. This appender will receive output from all active threads. This method should not be used for Commons Logging as the KineticFusion application cannot create proxy log objects for Commons Logging

Parameters:
appender -
Throws:
KineticFusionException - if any exception occurs. The cause of the exception can be retrieved by calling getCause()

removeLoggingAppender

public boolean removeLoggingAppender(LoggingAppender appender)
                              throws KineticFusionException
Remove a global logging appender from the logging system

Parameters:
appender -
Returns:
true If the appender was located and removed successfully
Throws:
KineticFusionException - if any exception occurs. The cause of the exception can be retrieved by calling getCause()

removeLoggingAppender

public boolean removeLoggingAppender(LogEventAppender appender)
                              throws KineticFusionException
Remove a global log event appender from the logging system

Parameters:
appender -
Returns:
true If the appender was located and removed successfully
Throws:
KineticFusionException - if any exception occurs. The cause of the exception can be retrieved by calling getCause()

addConsoleLogger

public void addConsoleLogger()
                      throws KineticFusionException
Add a global console log appender to the logging system

Throws:
KineticFusionException - if any exception occurs. The cause of the exception can be retrieved by calling getCause()

removeAllLoggingHandlers

public void removeAllLoggingHandlers()
                              throws KineticFusionException
Remove all user-defined and system logging appenders from the application.

Throws:
KineticFusionException - if any exception occurs. The cause of the exception can be retrieved by calling getCause()

getConfigurationManager

public ConfigurationManagerType getConfigurationManager()
                                                 throws KineticFusionException
Returns the global object for accessing and altering configuration properties for the entire application and for individual threads

Returns:
ConfigurationManager object allowing access to configuration information
Throws:
KineticFusionException - if any exception occurs. The cause of the exception can be retrieved by calling getCause()

newServer

public KineticFusionServerType newServer()
                                  throws KineticFusionException
Returns a new KineticFusionServerType for processing RVML and SWF documents

Returns:
a new KineticFusionServerType instance if successful
Throws:
KineticFusionException - if any exception occurs. The cause of the exception can be retrieved by calling getCause()

newServerSaxHandler

public ServerSaxHandlerType newServerSaxHandler()
                                         throws KineticFusionException
Returns a new ServerSaxHandlerType for processing RVML documents generated by externally generating SAX events

Returns:
a new ServerSaxHandlerType instance if successful
Throws:
KineticFusionException - if any exception occurs. The cause of the exception can be retrieved by calling getCause()