org.neodatis.odb
Class ODBFactory

java.lang.Object
  extended by org.neodatis.odb.ODBFactory

public class ODBFactory
extends java.lang.Object

The ODBFactory to obtain the right ODB implementation.

Author:
osmadja

Method Summary
static ODB open(java.lang.String fileName)
          Open a non password protected ODB database
static ODB open(java.lang.String fileName, java.lang.String user, java.lang.String password)
          Open an ODB database protected by a user and password
static ODB openClient(java.lang.String hostName, int port, java.lang.String baseIdentifier)
          Open an ODB Client
static ODB openClient(java.lang.String hostName, int port, java.lang.String baseIdentifier, java.lang.String user, java.lang.String password)
           
static ODBServer openServer(int port)
          Open an ODB server on the specific port.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

open

public static ODB open(java.lang.String fileName,
                       java.lang.String user,
                       java.lang.String password)
Open an ODB database protected by a user and password

Parameters:
fileName - The name of the ODB database
user - The user of the database
password - The password of the user
Returns:
The ODB database

open

public static ODB open(java.lang.String fileName)
Open a non password protected ODB database

Parameters:
fileName - The ODB database name
Returns:
A local ODB implementation

openServer

public static ODBServer openServer(int port)
Open an ODB server on the specific port. This will the socketServer on the specified port. Must call startServer of the ODBServer to actually start the server

Parameters:
port - The server port
Returns:
The server

openClient

public static ODB openClient(java.lang.String hostName,
                             int port,
                             java.lang.String baseIdentifier)
Open an ODB Client

Parameters:
hostName -
port -
baseIdentifier - The base identifier : The alias used by the server to declare database
Returns:
The ODB

openClient

public static ODB openClient(java.lang.String hostName,
                             int port,
                             java.lang.String baseIdentifier,
                             java.lang.String user,
                             java.lang.String password)
Parameters:
hostName -
port -
baseIdentifier - The base identifier : The alias used by the server to declare database
user - Remote access user
password - Remote access password
Returns:
The ODB