org.apache.wsrp4j.persistence.driver
Class PersistentAccess

java.lang.Object
  extended byorg.apache.wsrp4j.persistence.driver.PersistentAccess

public class PersistentAccess
extends java.lang.Object

This class provides a static method to access the client and server persistent factories.It reads in the file "WSRPServices.properties" for the server and the file "SwingConsumer.properties" for a client.

Version:
$Id: PersistentAccess.java,v 1.4 2005/08/10 14:59:59 cziegeler Exp $
Author:
Ralf Altrichter

Field Summary
private static java.lang.String CLIENT
           
private static java.lang.String CLIENT_PERSISTENT_FACTORY
           
private static ClientPersistentFactory clientPersistentFactory
           
private static Logger logger
           
private static java.util.Properties pFactories
           
private static java.lang.String SERVER_PERSISTENT_FACTORY
           
private static ServerPersistentFactory serverPersistentFactory
           
private static java.lang.String WSRP_SERVICES
           
 
Constructor Summary
PersistentAccess()
           
 
Method Summary
static ClientPersistentFactory getClientPersistentFactory()
          Fetches a client factory-instance.
private static java.lang.Object getFactory(java.lang.String type, java.lang.String propertyFile)
          Returns the factory loaded from the properties file.
static ServerPersistentFactory getServerPersistentFactory()
          Fetches a server factory-instance.
private static java.lang.Class getThisClass()
          Returns the class object of PersistentrAccess
private static void loadPropertyFile(java.lang.String propertyFile)
          Loads the content of a properties file into a private Properties object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WSRP_SERVICES

private static java.lang.String WSRP_SERVICES

CLIENT

private static java.lang.String CLIENT

SERVER_PERSISTENT_FACTORY

private static java.lang.String SERVER_PERSISTENT_FACTORY

CLIENT_PERSISTENT_FACTORY

private static java.lang.String CLIENT_PERSISTENT_FACTORY

pFactories

private static java.util.Properties pFactories

serverPersistentFactory

private static ServerPersistentFactory serverPersistentFactory

clientPersistentFactory

private static ClientPersistentFactory clientPersistentFactory

logger

private static Logger logger
Constructor Detail

PersistentAccess

public PersistentAccess()
Method Detail

getServerPersistentFactory

public static ServerPersistentFactory getServerPersistentFactory()
                                                          throws WSRPException
Fetches a server factory-instance.

Returns:
ServerPersistentFactory
Throws:
WSRPException

getClientPersistentFactory

public static ClientPersistentFactory getClientPersistentFactory()
                                                          throws WSRPException
Fetches a client factory-instance.

Returns:
ClientPersistentFactory
Throws:
WSRPException

getFactory

private static java.lang.Object getFactory(java.lang.String type,
                                           java.lang.String propertyFile)
                                    throws WSRPException
Returns the factory loaded from the properties file.

Parameters:
type - of the factory as string value
propertyFile - name of the property file as string value
Throws:
WSRPException

loadPropertyFile

private static void loadPropertyFile(java.lang.String propertyFile)
                              throws WSRPException
Loads the content of a properties file into a private Properties object. The properties file to load contains the factory information.

Parameters:
propertyFile - name of the property file as string value
Throws:
WSRPException

getThisClass

private static java.lang.Class getThisClass()
Returns the class object of PersistentrAccess

Returns:
java.lang.Class


--