dermi
Class SessionFactory

java.lang.Object
  extended by dermi.SessionFactory

public class SessionFactory
extends java.lang.Object

Utility class that connects to the notification service using environment parameters and instantiates the appropriate class provider.

Version:
1.2
Author:
Carles Pairot , Pedro Garcia

Constructor Summary
SessionFactory()
           
 
Method Summary
static Session createSession(java.util.Hashtable env)
          Method used to create a session
static Session createSession(java.lang.String envFile)
          Method used to create a session
static Session createSession(java.net.URL fileUrl)
          Method used to create a session
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionFactory

public SessionFactory()
Method Detail

createSession

public static Session createSession(java.util.Hashtable env)
                             throws SessionException
Method used to create a session

Parameters:
env - Hashtable Environment connection properties
Returns:
Session Returns a session of the type specified in the environment properties
Throws:
SessionException - Error produced in the connection phase

createSession

public static Session createSession(java.lang.String envFile)
                             throws SessionException
Method used to create a session

Parameters:
envFile - Name of the file containing environment connection properties
Returns:
Session Returns a Session of the type specified in Environment properties
Throws:
SessionException - Error produced in the connection phase

createSession

public static Session createSession(java.net.URL fileUrl)
                             throws SessionException
Method used to create a session

Parameters:
fileUrl - URL of the file containing environment connection properties
Returns:
Session Returns a Session of the type specified in environment properties
Throws:
SessionException - Error produced in the connection phase.